<?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 AES Based Secure object creation - OPTEE in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/AES-Based-Secure-object-creation-OPTEE/m-p/1283696#M8101</link>
    <description>&lt;P&gt;I am trying to create a AES based secure object. For this purpose,&amp;nbsp; I have modified existing&amp;nbsp; secure_storage application provided by NXP.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;secure_storage_ta$ tree
.
├── host
│   ├── aes_data.h
│   ├── Makefile
│   ├── rsa_data.h
│   ├── secure_storage
│   ├── secure_storage.c
│   └── secure_storage.o
├── LICENSE
├── Makefile
├── README.md
└── ta
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.dmp
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.elf
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.map
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.stripped.elf
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.ta
    ├── include
    │   ├── securekey_api_types.h
    │   ├── secure_storage_common.h
    │   └── ta_secure_storage.h
    ├── Makefile
    ├── secure_storage_aes.c
    ├── secure_storage_aes.o
    ├── secure_storage_common.c
    ├── secure_storage_common.o
    ├── secure_storage_create.c
    ├── secure_storage_create.o
    ├── secure_storage_crypto.c
    ├── secure_storage_crypto.o
    ├── secure_storage_db.c
    ├── secure_storage_db.o
    ├── secure_storage_ec.c
    ├── secure_storage_ec.o
    ├── secure_storage_entry.c
    ├── secure_storage_entry.o
    ├── secure_storage_find.c
    ├── secure_storage_find.o
    ├── secure_storage_generate.c
    ├── secure_storage_generate.o
    ├── secure_storage_helper.c
    ├── secure_storage_helper.o
    ├── secure_storage_rsa.c
    ├── secure_storage_rsa.o
    ├── sub.mk
    ├── ta.lds
    ├── user_ta_header_defines.h
    └── user_ta_header.o&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Added support for AES key type.&lt;/P&gt;&lt;P&gt;However, when&amp;nbsp; I run the secure_storage application getting an error bad parameter.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;TEEC_InvokeCommand failed with code 0xffff0006&lt;/LI-CODE&gt;&lt;P&gt;Suspect something is missing in the attributes passed to&amp;nbsp;TEEC_InvokeCommand.&lt;/P&gt;&lt;P&gt;Below it the modified attribute structure&lt;/P&gt;&lt;LI-CODE lang="c"&gt;SK_OBJECT_TYPE obj_aes = SK_SECRET_KEY;
uint32_t obj_id_aes = 1;
SK_KEY_TYPE key_aes = SKK_AES;
uint32_t key_len_aes = 16; 
char label_aes[] = "Device_Key_AES";

static const uint8_t key_val_aes[] = { 
    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 
    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I miss something in attribute structure. Any help? I am new to optee.&lt;/P&gt;&lt;P&gt;Appreciate&amp;nbsp; your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2021 20:31:00 GMT</pubDate>
    <dc:creator>krishnanp</dc:creator>
    <dc:date>2021-05-27T20:31:00Z</dc:date>
    <item>
      <title>AES Based Secure object creation - OPTEE</title>
      <link>https://community.nxp.com/t5/Layerscape/AES-Based-Secure-object-creation-OPTEE/m-p/1283696#M8101</link>
      <description>&lt;P&gt;I am trying to create a AES based secure object. For this purpose,&amp;nbsp; I have modified existing&amp;nbsp; secure_storage application provided by NXP.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;secure_storage_ta$ tree
.
├── host
│   ├── aes_data.h
│   ├── Makefile
│   ├── rsa_data.h
│   ├── secure_storage
│   ├── secure_storage.c
│   └── secure_storage.o
├── LICENSE
├── Makefile
├── README.md
└── ta
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.dmp
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.elf
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.map
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.stripped.elf
    ├── b05bcf48-9732-4efa-a9e0-141c7c888c34.ta
    ├── include
    │   ├── securekey_api_types.h
    │   ├── secure_storage_common.h
    │   └── ta_secure_storage.h
    ├── Makefile
    ├── secure_storage_aes.c
    ├── secure_storage_aes.o
    ├── secure_storage_common.c
    ├── secure_storage_common.o
    ├── secure_storage_create.c
    ├── secure_storage_create.o
    ├── secure_storage_crypto.c
    ├── secure_storage_crypto.o
    ├── secure_storage_db.c
    ├── secure_storage_db.o
    ├── secure_storage_ec.c
    ├── secure_storage_ec.o
    ├── secure_storage_entry.c
    ├── secure_storage_entry.o
    ├── secure_storage_find.c
    ├── secure_storage_find.o
    ├── secure_storage_generate.c
    ├── secure_storage_generate.o
    ├── secure_storage_helper.c
    ├── secure_storage_helper.o
    ├── secure_storage_rsa.c
    ├── secure_storage_rsa.o
    ├── sub.mk
    ├── ta.lds
    ├── user_ta_header_defines.h
    └── user_ta_header.o&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Added support for AES key type.&lt;/P&gt;&lt;P&gt;However, when&amp;nbsp; I run the secure_storage application getting an error bad parameter.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;TEEC_InvokeCommand failed with code 0xffff0006&lt;/LI-CODE&gt;&lt;P&gt;Suspect something is missing in the attributes passed to&amp;nbsp;TEEC_InvokeCommand.&lt;/P&gt;&lt;P&gt;Below it the modified attribute structure&lt;/P&gt;&lt;LI-CODE lang="c"&gt;SK_OBJECT_TYPE obj_aes = SK_SECRET_KEY;
uint32_t obj_id_aes = 1;
SK_KEY_TYPE key_aes = SKK_AES;
uint32_t key_len_aes = 16; 
char label_aes[] = "Device_Key_AES";

static const uint8_t key_val_aes[] = { 
    0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 
    0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I miss something in attribute structure. Any help? I am new to optee.&lt;/P&gt;&lt;P&gt;Appreciate&amp;nbsp; your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 20:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/AES-Based-Secure-object-creation-OPTEE/m-p/1283696#M8101</guid>
      <dc:creator>krishnanp</dc:creator>
      <dc:date>2021-05-27T20:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: AES Based Secure object creation - OPTEE</title>
      <link>https://community.nxp.com/t5/Layerscape/AES-Based-Secure-object-creation-OPTEE/m-p/1283976#M8105</link>
      <description>&lt;P&gt;Please refer to "4. Develop OP-TEE Trusted Application " in&amp;nbsp;&lt;A href="https://community.nxp.com/t5/QorIQ-Knowledge-Base/OP-TEE-Trusted-Application-on-QorIQ-ARM-Based-Processors/ta-p/1099217" target="_blank"&gt;https://community.nxp.com/t5/QorIQ-Knowledge-Base/OP-TEE-Trusted-Application-on-QorIQ-ARM-Based-Processors/ta-p/1099217&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 07:33:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/AES-Based-Secure-object-creation-OPTEE/m-p/1283976#M8105</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-05-28T07:33:25Z</dc:date>
    </item>
  </channel>
</rss>

