<?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: How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux? in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2411139#M2145</link>
    <description>Thank you very much for this exceptionally detailed and clear explanation.&lt;BR /&gt;The flag-by-flag breakdown, the build command example, and especially the critical caveat regarding the I2C conflict and the choice between Choice A (OP-TEE Exclusive via libckteec.so) and Choice B (Co-existence) have clarified our setup options.&lt;BR /&gt;This information was exactly what we needed to determine our architecture moving forward.</description>
    <pubDate>Fri, 04 Sep 2026 00:01:51 GMT</pubDate>
    <dc:creator>Uc_S</dc:creator>
    <dc:date>2026-09-04T00:01:51Z</dc:date>
    <item>
      <title>How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2409927#M2137</link>
      <description>&lt;P&gt;Hello, NXP Community,&lt;/P&gt;&lt;P&gt;I am currently working on integrating the Plug and Trust Middleware into OP-TEE based on the environment described in this post: &lt;A href="https://community.nxp.com/t5/Secure-Authentication/How-to-integrate-Plug-and-Trust-MW-into-OP-TEE/td-p/2407685" target="_blank" rel="noopener"&gt;How to integrate Plug and Trust MW into OP-TEE.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My goal is to achieve the following operations from a user-space application running on Linux, leveraging the SE051 secure element:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Generate an AES key and store it in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Generate an RSA key pair and store it in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Encrypt a file using the AES key stored in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Decrypt the file using the AES key stored in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Sign data using the RSA private key in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Verify the signature using the RSA public key in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Encrypt data using the RSA public key in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Decrypt data using the RSA private key in SE051.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Could anyone guide me on the best approach to achieve these operations? I am open to using any of the following command-line tools (or a combination of them), provided they are supported in this OP-TEE setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;openssl commands (via OpenSSL provider)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;ssscli tool&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;pkcs11-tool (via PKCS#11 interface)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any examples, documentation links, or command usage samples for this specific OP-TEE environment would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2026 07:25:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2409927#M2137</guid>
      <dc:creator>Uc_S</dc:creator>
      <dc:date>2026-09-01T07:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410383#M2139</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/259681"&gt;@Uc_S&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are &lt;STRONG&gt;three supported paths&lt;/STRONG&gt; from Linux user-space to the SE051. All three are available with Plug &amp;amp; Trust MW v04.07.01:&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Path&lt;/TH&gt;
&lt;TH&gt;Library&lt;/TH&gt;
&lt;TH&gt;Best For&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;PKCS#11&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;libsss_pkcs11.so&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;AES, RSA key gen/sign/verify/enc/dec via &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;OpenSSL Provider (3.x)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;libsss_provider.so&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;RSA sign/verify/enc/dec via &lt;CODE&gt;openssl pkeyutl&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;ssscli&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;Python CLI&lt;/TD&gt;
&lt;TD&gt;Key injection / provisioning only&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Important note for OP-TEE environment:&lt;/STRONG&gt; In your OP-TEE setup (&lt;CODE&gt;CFG_NXP_SE05X=y&lt;/CODE&gt;), the SE051 is accessed by OP-TEE core directly via the native I2C driver. Linux user-space applications do &lt;STRONG&gt;not&lt;/STRONG&gt; own the I2C bus. All three paths above work correctly because the Plug &amp;amp; Trust MW Access Manager (&lt;CODE&gt;accessManager&lt;/CODE&gt;) or the T1oI2C socket interface routes commands through OP-TEE's trusted world to the SE051.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 1: Generate an AES Key and Store It in SE051&lt;/H2&gt;
&lt;P&gt;Use &lt;CODE&gt;ssscli&lt;/CODE&gt; to generate an AES-256 key at a specific Key ID (object ID in SE051):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Generate AES-256 key at Key ID 0x20000001
ssscli generate aes 0x20000001 256
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To verify the key exists:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;ssscli get aes 0x20000001 aes_key_info.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; AES keys are symmetric and cannot be exported from SE051. The Key ID &lt;CODE&gt;0x20000001&lt;/CODE&gt; is a 32-bit object identifier stored persistently in SE051 NVM.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 2: Generate an RSA Key Pair and Store It in SE051&lt;/H2&gt;
&lt;H3&gt;Option A — Using &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt; (recommended)&lt;/H3&gt;
&lt;P&gt;RSA key labels use the format &lt;CODE&gt;sss:&amp;lt;keyId_hex&amp;gt;&lt;/CODE&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Generate RSA-2048 key pair at Key ID 0x10101010
pkcs11-tool --module $PKCS11_MODULE   --keypairgen   --key-type rsa:2048   --label "sss:10101010"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;Option B — Using &lt;CODE&gt;ssscli&lt;/CODE&gt;&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;ssscli generate rsa 0x10101010 2048
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;AN13030 Section 3.3.8.3 notes: RSA key pairs must be DER encoded using PKCS#8 or traditional OpenSSL format when injecting externally. When retrieved via &lt;CODE&gt;sss_key_store_get_key()&lt;/CODE&gt;, only the &lt;STRONG&gt;public key&lt;/STRONG&gt; is returned.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 3: Encrypt a File Using the AES Key in SE051&lt;/H2&gt;
&lt;P&gt;AES symmetric encryption is performed via the SSS API (&lt;CODE&gt;sss_cipher_one_go&lt;/CODE&gt;) or, for command-line use, through a small wrapper application. The MW provides a built-in symmetric example at:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;simw-top/sss/ex/symmetric/ex_sss_symmetric.c
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For direct command-line use, build and run the example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# After building the MW examples:
./se05x_symmetric_aes_cbc_encrypt   --keyid 0x20000001   --input plaintext.bin   --output ciphertext.bin   --iv 00000000000000000000000000000000
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The MW supports: &lt;CODE&gt;kAlgorithm_SSS_AES_ECB&lt;/CODE&gt;, &lt;CODE&gt;kAlgorithm_SSS_AES_CBC&lt;/CODE&gt;, &lt;CODE&gt;kAlgorithm_SSS_AES_CTR&lt;/CODE&gt;, &lt;CODE&gt;kAlgorithm_SSS_AES_GCM&lt;/CODE&gt;, &lt;CODE&gt;kAlgorithm_SSS_AES_CCM&lt;/CODE&gt; (from Section 3.3.9.1 of AN13030).&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 4: Decrypt a File Using the AES Key in SE051&lt;/H2&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;./se05x_symmetric_aes_cbc_decrypt   --keyid 0x20000001   --input ciphertext.bin   --output decrypted.bin   --iv 00000000000000000000000000000000
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The SSS API uses &lt;CODE&gt;kMode_SSS_Decrypt&lt;/CODE&gt; mode with &lt;CODE&gt;sss_cipher_one_go()&lt;/CODE&gt; for one-shot decryption, or the multi-step &lt;CODE&gt;sss_cipher_init()&lt;/CODE&gt; / &lt;CODE&gt;sss_cipher_update()&lt;/CODE&gt; / &lt;CODE&gt;sss_cipher_finish()&lt;/CODE&gt; sequence for streaming.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 5: Sign Data Using the RSA Private Key in SE051&lt;/H2&gt;
&lt;H3&gt;Using &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt; (key stays in SE051)&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Sign with RSA private key (key never leaves SE051)
pkcs11-tool --module $PKCS11_MODULE   --sign   --label sss:10101010   -m SHA256-RSA-PKCS   --slot 1   -i in.der   -o signature.der
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Supported sign mechanisms via PKCS#11:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;SHA256-RSA-PKCS&lt;/CODE&gt; (RSASSA-PKCS1-v1_5 with SHA-256)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;SHA1-RSA-PKCS&lt;/CODE&gt;, &lt;CODE&gt;SHA384-RSA-PKCS&lt;/CODE&gt;, &lt;CODE&gt;SHA512-RSA-PKCS&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;RSA-PKCS-PSS&lt;/CODE&gt; (PSS padding)&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="wnfdnti _1ibi0s33y _1ibi0s34u" dir="auto" data-pm-slice="1 1 []"&gt;Using OpenSSL Provider (v3.x)&lt;/H3&gt;
&lt;PRE class="_1ibi0s3d1" dir="auto"&gt;&lt;CODE class="language-bash"&gt;# Configure OpenSSL to use the NXP provider (see /etc/ssl/openssl.cnf)
openssl pkeyutl -provider nxp   -sign   -inkey "pkcs11:token=sss;object=sss:10101010;type=private"   -in in.txt   -out signature.der&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2&gt;Operation 6: Verify Signature Using the RSA Public Key in SE051&lt;/H2&gt;
&lt;H3&gt;Step 1 — Export public key from SE051&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Method A: via ssscli
ssscli get rsa pub 0x10101010 rsa_pub.der

# Method B: via pkcs11-tool
pkcs11-tool --module $PKCS11_MODULE   --read-object --type pubkey   --slot 1   --label sss:10101010   -o pubkey.der

# Convert DER to PEM for OpenSSL
openssl rsa -in pubkey.der -inform der -out pubkey.pem -outform pem -pubin
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;Step 2 — Verify (host-side, no SE051 required)&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;openssl dgst   -keyform PEM   -verify pubkey.pem   -sha256   -signature signature.der   in.txt
# Expected output: Verified OK
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 7: Encrypt Data Using the RSA Public Key in SE051&lt;/H2&gt;
&lt;P&gt;RSA encryption uses the &lt;STRONG&gt;public key&lt;/STRONG&gt; (no secure element needed for encrypt):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Encrypt with public key (host side)
openssl rsautl   -encrypt   -inkey pubkey.pem   -in in.txt   -pubin   -out crypt.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;For OAEP padding (recommended), use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;openssl pkeyutl -encrypt -inkey pubkey.pem -pubin &amp;gt;   -pkeyopt rsa_padding_mode:oaep &amp;gt;   -pkeyopt rsa_oaep_md:sha256 &amp;gt;   -in in.txt -out crypt.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;AN13030 Section 3.3.5.6 lists supported algorithms including &lt;CODE&gt;kAlgorithm_SSS_RSAES_PKCS1_OAEP_SHA256&lt;/CODE&gt; and &lt;CODE&gt;kAlgorithm_SSS_RSAES_PKCS1_V1_5&lt;/CODE&gt;.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Operation 8: Decrypt Data Using the RSA Private Key in SE051&lt;/H2&gt;
&lt;P&gt;The RSA private key decryption is performed entirely inside SE051. The private key &lt;STRONG&gt;never leaves the secure element&lt;/STRONG&gt;.&lt;/P&gt;
&lt;H3&gt;Using &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt;&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;pkcs11-tool --module $PKCS11_MODULE   --decrypt   --label sss:10101010   --slot 1   -i crypt.txt   -o decrypt.txt

cat decrypt.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;Using OpenSSL Provider (v3.x)&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;openssl pkeyutl -provider nxp   -decrypt   -inkey "pkcs11:token=sss;object=sss:10101010;type=private"   -in crypt.txt   -out decrypt.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;AN13030 Section 2.3.4 confirms: "RSA Encrypt and decrypt feature added in provider" (from v04.05.03 onwards, included in v04.07.01).&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Key ID Label Convention&lt;/H2&gt;
&lt;P&gt;When using &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt; with the NXP PKCS#11 library, the Key ID label format is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sss:&amp;lt;keyId_hex_without_0x&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For example, Key ID &lt;CODE&gt;0x10101010&lt;/CODE&gt; → label &lt;CODE&gt;sss:10101010&lt;/CODE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Breaking change in v04.07.00 (PKCS#11 v4.7):&lt;/STRONG&gt; The &lt;CODE&gt;CKA_ID&lt;/CODE&gt; attribute (&lt;CODE&gt;--id&lt;/CODE&gt;) is now treated as a byte array to avoid byte swapping. Pass the ID without changing endianness.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;PKCS#11 Token Initialization (First-Time Setup)&lt;/H2&gt;
&lt;P&gt;Before using &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt;, you may need to initialize the token slot:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;# Initialize slot 0
pkcs11-tool --module $PKCS11_MODULE --init-token --slot 0   --label "SE051_Token" --so-pin 12345678

# Set user PIN
pkcs11-tool --module $PKCS11_MODULE --init-pin   --slot 0 --login --so-pin 12345678 --pin 87654321
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;
&lt;H2&gt;OpenSSL 3.x Provider Configuration&lt;/H2&gt;
&lt;P&gt;Add to &lt;CODE&gt;/etc/ssl/openssl.cnf&lt;/CODE&gt; (or a custom config file):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-ini"&gt;[openssl_init]
providers = provider_sect

[provider_sect]
default = default_sect
nxp = nxp_sect

[default_sect]
activate = 1

[nxp_sect]
module = /usr/local/lib/libsss_provider.so
activate = 1
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The OpenSSL provider source is also available at: &lt;A href="https://github.com/NXPPlugNTrust/se05x-openssl-provider" target="_blank"&gt;https://github.com/NXPPlugNTrust/se05x-openssl-provider&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;
&lt;H2&gt;Source Code Examples (in simw-top)&lt;/H2&gt;
&lt;P&gt;The following built-in examples in the MW package directly demonstrate these operations:&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Operation&lt;/TH&gt;
&lt;TH&gt;Example Path&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;AES encrypt/decrypt&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/sss/ex/symmetric/ex_sss_symmetric.c&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;RSA sign/verify&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/sss/ex/rsa/&lt;/CODE&gt; (Section 5.2.1.2 of AN13030)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ECC sign/verify&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/sss/ex/ecc/&lt;/CODE&gt; (Section 5.2.1.1 of AN13030)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;PKCS#11 scripts&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/sss/plugin/pkcs11/scripts/&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;OpenSSL Provider RSA enc&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/sss/plugin/openssl_provider/scripts/openssl_RsaEnc.py&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;
&lt;H2&gt;Known Limitations in OP-TEE Context&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;AES offload to SE051 from OP-TEE kernel side depends on &lt;CODE&gt;CFG_NXP_SE05X_CTR_DRV&lt;/CODE&gt; being enabled. User-space AES via PKCS#11 goes through the Access Manager and is separate from the OP-TEE crypto driver offload.&lt;/LI&gt;
&lt;LI&gt;RSA key generation in SE051 is CRT format by default in v04.07.01 (&lt;CODE&gt;RSA_CRT&lt;/CODE&gt; support added in PKCS11 v4.8). Use &lt;CODE&gt;PKCS11_ENABLE_RSA_KEY_GEN_CRT&lt;/CODE&gt; cmake option to switch between CRT and plain RSA.&lt;/LI&gt;
&lt;LI&gt;SE051 NVM is limited. Many RSA key pair generations may exhaust persistent storage — delete unused objects with &lt;CODE&gt;ssscli delete &amp;lt;keyId&amp;gt;&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;For concurrent multi-process access (e.g., multiple user-space apps), use the &lt;STRONG&gt;Access Manager&lt;/STRONG&gt; at &lt;CODE&gt;simw-top/hostlib/hostlib/accessManager&lt;/CODE&gt;. Build with &lt;CODE&gt;-DSMCOM:STRING=JRCP_V1_AM&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;H2&gt;Reference Documents&lt;/H2&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Document&lt;/TH&gt;
&lt;TH&gt;Description&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=AN13030" target="_blank"&gt;AN13030&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;Plug &amp;amp; Trust MW Documentation (primary reference)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12660.pdf" target="_blank"&gt;AN12660&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;IEC 62443 compliance with SE05x — includes SSS API example pointers&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/doc/&lt;/CODE&gt; (local HTML)&lt;/TD&gt;
&lt;TD&gt;Full documentation for your installed version v04.08.01&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/doc/plugins/pkcs11.html&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;PKCS#11 Standalone Library documentation&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;simw-top/doc/demos.html&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Complete list of available demo examples&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2026 09:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410383#M2139</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2026-09-02T09:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410773#M2142</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for the thorough and detailed response.&lt;BR /&gt;The breakdown of the three supported paths and the command examples are extremely helpful.&lt;/P&gt;&lt;P&gt;Regarding the OP-TEE environment, I have a follow-up question regarding the CMake build configuration for the Plug &amp;amp; Trust Middleware on the Linux rootfs.&lt;/P&gt;&lt;P&gt;Previously, when running the middleware directly on Linux (without OP-TEE routing), we used the following CMake configuration flags:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-DPTMW_Applet=SE05X_C
-DPTMW_SE05X_Ver=07_02
-DPTMW_Host=iMXLinux
-DPTMW_SMCOM=T1oI2C
-DPTMW_HostCrypto=OPENSSL
-DPTMW_RTOS=Default
-DPTMW_mbedTLS_ALT=None
-DPTMW_SCP=SCP03_SSS
-DPTMW_FIPS=None
-DPTMW_SBL=None
-DPTMW_SE05X_Auth=PlatfSCP03
-DPTMW_Log=Silent
-DCMAKE_BUILD_TYPE=Release
-DPTMW_OpenSSL=3_0
-DPTMW_SE_RESET_LOGIC=1&lt;/LI-CODE&gt;&lt;P&gt;Could you please advise which of the above settings should be changed and what their new recommended values should be for this OP-TEE setup?&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;Now that OP-TEE owns the direct I2C access to the SE051 (via CFG_NXP_SE05X=y), could you please clarify if any of these CMake flags need to be modified when building the Linux user-space middleware/tools (such as ssscli or Access Manager)?&lt;/P&gt;&lt;P&gt;Specifically, should options like -DPTMW_SMCOM (e.g., changing from T1oI2C to JRCP_V1_AM or socket interface) or -DPTMW_Host be updated for the Linux user-space side to properly route requests through OP-TEE?&lt;/P&gt;&lt;P&gt;Here are my environment details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Board: MCIMX8M-WEVK and OM-SE051ARD&lt;/LI&gt;&lt;LI&gt;Plug and Trust MW Version: v04.07.01&lt;/LI&gt;&lt;LI&gt;OP-TEE OS Version: 3.19.0&lt;/LI&gt;&lt;LI&gt;Linux Kernel: 6.1.151&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 03 Sep 2026 04:05:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410773#M2142</guid>
      <dc:creator>Uc_S</dc:creator>
      <dc:date>2026-09-03T04:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410848#M2143</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/259681"&gt;@Uc_S&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When &lt;CODE&gt;CFG_NXP_SE05X=y&lt;/CODE&gt; is set, &lt;STRONG&gt;OP-TEE takes exclusive ownership of the I2C bus&lt;/STRONG&gt; to the SE051. The Linux DTS must disable that I2C controller (as described in the integration guide). This fundamentally changes how the Plug &amp;amp; Trust MW is used:&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Layer&lt;/TH&gt;
&lt;TH&gt;Who Runs It&lt;/TH&gt;
&lt;TH&gt;How It Reaches SE051&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;OP-TEE Secure World&lt;/TD&gt;
&lt;TD&gt;OP-TEE core&lt;/TD&gt;
&lt;TD&gt;Native I2C driver (&lt;CODE&gt;CFG_IMX_I2C=y&lt;/CODE&gt;) — &lt;STRONG&gt;direct, exclusive&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Linux Userspace&lt;/TD&gt;
&lt;TD&gt;Your application, ssscli, Access Manager&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;Cannot use T1oI2C&lt;/STRONG&gt; — I2C is disabled in Linux DTS&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;This means your existing cmake configuration with &lt;CODE&gt;-DPTMW_SMCOM=T1oI2C&lt;/CODE&gt; applies only when Linux directly owns I2C. In the OP-TEE setup, it applies to two separate build scenarios described below.&lt;/P&gt;
&lt;HR /&gt;
&lt;H2&gt;Scenario 1: MW Build Fed into OP-TEE (&lt;CODE&gt;CFG_NXP_SE05X_PLUG_AND_TRUST=&lt;/CODE&gt;)&lt;/H2&gt;
&lt;P&gt;This is the most important case. The MW is compiled as a &lt;STRONG&gt;static library inside OP-TEE&lt;/STRONG&gt; — you do &lt;STRONG&gt;not&lt;/STRONG&gt; run &lt;CODE&gt;cmake&lt;/CODE&gt; manually for this. OP-TEE's Makefile handles the integration automatically when you point &lt;CODE&gt;CFG_NXP_SE05X_PLUG_AND_TRUST&lt;/CODE&gt; at your extracted MW directory:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-makefile"&gt;CFG_NXP_SE05X_PLUG_AND_TRUST=$HOME/linux-factory/plug-and-trust
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The SMCOM, Host, and Auth flags you listed are &lt;STRONG&gt;not applicable&lt;/STRONG&gt; here. OP-TEE drives the SE051 via its own native I2C abstraction layer (&lt;CODE&gt;CFG_IMX_I2C=y&lt;/CODE&gt;), bypassing the Linux MW communication stack entirely.&lt;/P&gt;
&lt;HR /&gt;
&lt;H2&gt;Scenario 2: Linux Userspace Tools (ssscli / Access Manager / Demos)&lt;/H2&gt;
&lt;P&gt;This is where your cmake flags do apply. When OP-TEE owns I2C, here is the flag-by-flag analysis of what must change:&lt;/P&gt;
&lt;H3&gt;Flags That MUST Change&lt;/H3&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Flag&lt;/TH&gt;
&lt;TH&gt;Your Current Value&lt;/TH&gt;
&lt;TH&gt;Recommended Value for OP-TEE Setup&lt;/TH&gt;
&lt;TH&gt;Reason&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SMCOM&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;T1oI2C&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;&lt;CODE&gt;JRCP_V1_AM&lt;/CODE&gt;&lt;/STRONG&gt; (if using Access Manager)&lt;/TD&gt;
&lt;TD&gt;Linux cannot use I2C directly; Access Manager provides socket proxy&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SE05X_Auth&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;PlatfSCP03&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;SCP03 channel is established by OP-TEE, not Linux userspace&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SCP&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;SCP03_SSS&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;Same reason — SCP03 is owned by OP-TEE secure world&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;Flags That Stay the Same&lt;/H3&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Flag&lt;/TH&gt;
&lt;TH&gt;Value&lt;/TH&gt;
&lt;TH&gt;Reason&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_Applet&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;SE05X_C&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Correct for your SE051C2 variant (OEF ID A8FA)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SE05X_Ver&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;07_02&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Matches applet version 7.2 seen in OP-TEE boot logs&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_Host&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;iMXLinux&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Still running on i.MX Linux&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_HostCrypto&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;OPENSSL&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_RTOS&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;Default&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_OpenSSL&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;3_0&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged for OpenSSL 3.x&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_FIPS&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SBL&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_mbedTLS_ALT&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_Log&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;Silent&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-DPTMW_SE_RESET_LOGIC&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;1&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Unchanged; new option added in v04.07.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;
&lt;H2&gt;Recommended cmake Command for Linux Userspace Tools in OP-TEE Setup&lt;/H2&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt;cd simw-top &amp;amp;&amp;amp; mkdir build_optee_linux
cmake -S . -B ./build_optee_linux/   -DPTMW_Applet=SE05X_C   -DPTMW_SE05X_Ver=07_02   -DPTMW_Host=iMXLinux   -DPTMW_SMCOM=JRCP_V1_AM   -DPTMW_HostCrypto=OPENSSL   -DPTMW_RTOS=Default   -DPTMW_mbedTLS_ALT=None   -DPTMW_SCP=None   -DPTMW_FIPS=None   -DPTMW_SBL=None   -DPTMW_SE05X_Auth=None   -DPTMW_Log=Silent   -DCMAKE_BUILD_TYPE=Release   -DPTMW_OpenSSL=3_0   -DPTMW_SE_RESET_LOGIC=1
cd build_optee_linux &amp;amp;&amp;amp; make -j8
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Note: &lt;CODE&gt;JRCP_V1_AM&lt;/CODE&gt; requires the &lt;STRONG&gt;Access Manager&lt;/STRONG&gt; to be running as a daemon on the target. The Access Manager itself connects to the SE051 — but see the important caveat below.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;
&lt;H2&gt;Critical Caveat: The Access Manager I2C Conflict&lt;/H2&gt;
&lt;P&gt;The Access Manager (&lt;CODE&gt;hostlib/hostLib/accessManager&lt;/CODE&gt;) is designed to serialize concurrent I2C access from multiple Linux processes. However:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;When OP-TEE fully disables the I2C interface in Linux DTS (as required by &lt;CODE&gt;CFG_NXP_SE05X=y&lt;/CODE&gt;), the Access Manager itself cannot open I2C either.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This means you have two valid deployment choices:&lt;/P&gt;
&lt;H3&gt;Choice A: OP-TEE Exclusive (Recommended for Production)&lt;/H3&gt;
&lt;P&gt;OP-TEE owns I2C completely. Linux userspace uses &lt;STRONG&gt;only&lt;/STRONG&gt; the OP-TEE PKCS#11 TA (&lt;CODE&gt;libckteec.so&lt;/CODE&gt;) for crypto operations. The Plug &amp;amp; Trust MW ssscli and demos are not run from Linux in this mode.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Linux App → libckteec.so → OP-TEE PKCS#11 TA → SE051
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the path described in the i.MX Linux User's Guide (UG10163) for OP-TEE-based SE05x use.&lt;/P&gt;
&lt;H3&gt;Choice B: Co-existence (Testing / Provisioning)&lt;/H3&gt;
&lt;P&gt;Use a Linux DTS that does &lt;STRONG&gt;not&lt;/STRONG&gt; disable I2C from Linux (i.e., do NOT apply the &lt;CODE&gt;lf-6.12.y-i2c-disabled-se050&lt;/CODE&gt; DTS patch). In this configuration:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;OP-TEE uses SE051 for crypto offload (RSA/ECC)&lt;/LI&gt;
&lt;LI&gt;Linux userspace can still run ssscli / Access Manager using &lt;CODE&gt;T1oI2C&lt;/CODE&gt; (your original flags)&lt;/LI&gt;
&lt;LI&gt;Risk: concurrent I2C access from both OP-TEE and Linux requires careful arbitration&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For this choice, &lt;STRONG&gt;revert SMCOM, SCP, and Auth flags to your original values&lt;/STRONG&gt; and keep the original I2C DTS (do not disable it).&lt;/P&gt;
&lt;HR /&gt;
&lt;H2&gt;Summary Table&lt;/H2&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH&gt;Use Case&lt;/TH&gt;
&lt;TH&gt;SMCOM&lt;/TH&gt;
&lt;TH&gt;SCP&lt;/TH&gt;
&lt;TH&gt;Auth&lt;/TH&gt;
&lt;TH&gt;Notes&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;OP-TEE internal MW (static lib for OP-TEE build)&lt;/TD&gt;
&lt;TD&gt;N/A&lt;/TD&gt;
&lt;TD&gt;N/A&lt;/TD&gt;
&lt;TD&gt;N/A&lt;/TD&gt;
&lt;TD&gt;No cmake needed; handled by &lt;CODE&gt;CFG_NXP_SE05X_PLUG_AND_TRUST=&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Linux userspace, OP-TEE exclusive I2C&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;JRCP_V1_AM&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;None&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Requires Access Manager, but AM itself can't reach SE051 if I2C disabled&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Linux userspace, co-existence (I2C shared)&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;T1oI2C&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;SCP03_SSS&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;PlatfSCP03&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Your original flags — valid if Linux DTS still has I2C enabled&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Linux userspace via PKCS#11 TA (OP-TEE exclusive)&lt;/TD&gt;
&lt;TD&gt;N/A (no MW build)&lt;/TD&gt;
&lt;TD&gt;N/A&lt;/TD&gt;
&lt;TD&gt;N/A&lt;/TD&gt;
&lt;TD&gt;Use &lt;CODE&gt;pkcs11-tool&lt;/CODE&gt; / &lt;CODE&gt;openssl&lt;/CODE&gt; with &lt;CODE&gt;libckteec.so&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;
&lt;H2&gt;Additional Reference&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;AN13030 Rev. 2.4 — Section 4.4 (i.MX Linux Build), Section 8.9 (PKCS#11 Standalone Library), Access Manager documentation&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.nxp.com/docs/en/user-guide/UG10163.pdf" target="_blank"&gt;UG10163 i.MX Linux User's Guide&lt;/A&gt; — OP-TEE PKCS#11 command examples using libckteec.so (Sections 10.4.7 &amp;amp; 10.4.8, pages 110–114); &lt;STRONG&gt;Note:&lt;/STRONG&gt; these examples use OP-TEE internal secure storage as the key backend, not SE05x directly — the command syntax is the same when SE051 is configured as the OP-TEE crypto backend via CFG_NXP_SE05X=y&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2026 07:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2410848#M2143</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2026-09-03T07:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Key Gen, Enc/Dec, and Sign/Verify with SE051 via OP-TEE on Linux?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2411139#M2145</link>
      <description>Thank you very much for this exceptionally detailed and clear explanation.&lt;BR /&gt;The flag-by-flag breakdown, the build command example, and especially the critical caveat regarding the I2C conflict and the choice between Choice A (OP-TEE Exclusive via libckteec.so) and Choice B (Co-existence) have clarified our setup options.&lt;BR /&gt;This information was exactly what we needed to determine our architecture moving forward.</description>
      <pubDate>Fri, 04 Sep 2026 00:01:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/How-to-perform-Key-Gen-Enc-Dec-and-Sign-Verify-with-SE051-via-OP/m-p/2411139#M2145</guid>
      <dc:creator>Uc_S</dc:creator>
      <dc:date>2026-09-04T00:01:51Z</dc:date>
    </item>
  </channel>
</rss>

