<?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: SE050: received error in write user-id command in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1784796#M1485</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/223387"&gt;@Spri&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;0x6A80 means&amp;nbsp;the policy validation fails, please kindly check the policy attached to the secure object.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BTW, since you are going to create a UserID, shouldn't the type be&amp;nbsp;KPolicy_UserID instead of&amp;nbsp;KPolicy_Asym_Key?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&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>Tue, 09 Jan 2024 03:07:24 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2024-01-09T03:07:24Z</dc:date>
    <item>
      <title>SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1783793#M1482</link>
      <description>&lt;P&gt;Hello NXP community and support team,&lt;/P&gt;&lt;P&gt;I am newbie to the secure element, in my current project i am using SE050ARDF2 board with STM32 microcontroller with FRDMK64 board's SDK(by porting according to the my controller).&lt;/P&gt;&lt;P&gt;I have tested get info example and it is perfectly working, so my mw is working.&lt;/P&gt;&lt;P&gt;Currently i am trying to write User id in SE050 and i am getting error of SM_ERR_WRONG_DATA(0x6A80), and i am not getting the reason behind it.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;NOTE: Check summary section for quick review.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;My configuration and all steps are below mentioned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Here my fsl_sss_ftr.h file for configuration&lt;/P&gt;&lt;P&gt;/** SE050 (Super set of A + B) */&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_APPLET_SE05X_C 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_SE05X_VER_03_XX 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_HOSTCRYPTO_MBEDTLS 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_MBEDTLS_ALT_NONE 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_SCP_SCP03_SSS 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_FIPS_NONE 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_SBL_NONE 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_SE05X_AUTH_PLATFSCP03 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_AES 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_ECC 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_RSA 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_KEY_SET 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_KEY_GET 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_AuthECKey 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_AuthSession 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SE05X_CREATE_DELETE_CRYPTOOBJ 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SW_AES 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SW_ECC 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SW_RSA 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SW_KEY_SET 1&lt;/P&gt;&lt;P&gt;#define SSSFTR_SW_KEY_GET 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_ECC 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_RSA 0&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_TPM_BN 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_EC_ED 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_EC_MONT 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_MIFARE_DESFIRE 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_PBKDF2 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_TLS_HANDSHAKE 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_IMPORT 1&lt;/P&gt;&lt;P&gt;#define SSS_HAVE_TESTCOUNTERPART (SSSFTR_SW_TESTCOUNTERPART)&lt;/P&gt;&lt;P&gt;#define SSS_PFSCP_ENABLE_SE050F2_0001A92A 1&lt;/P&gt;&lt;P&gt;#endif /* SSS_APIS_INC_FSL_SSS_FTR_H_ */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)Created Session accordingly and it return's success.&lt;/P&gt;&lt;P&gt;status = ex_sss_boot_open(PCONTEXT, portName);&lt;/P&gt;&lt;P&gt;if (kStatus_SSS_Success != status) {&lt;/P&gt;&lt;P&gt;LOG_E("ex_sss_session_open Failed");&lt;/P&gt;&lt;P&gt;goto cleanup;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3)After session creation this function is called and here i am using write USER-ID function of middleware.&lt;/P&gt;&lt;P&gt;static ex_sss_boot_ctx_t gex_sss_gen_cert;&lt;/P&gt;&lt;P&gt;#define EX_SSS_BOOT_PCONTEXT (&amp;amp;gex_sss_gen_cert)&lt;/P&gt;&lt;P&gt;#define EX_SSS_BOOT_DO_ERASE 1&lt;/P&gt;&lt;P&gt;#define EX_SSS_BOOT_EXPOSE_ARGC_ARGV 0&lt;/P&gt;&lt;P&gt;#define ECC_KEY_BIT_LEN 256&lt;/P&gt;&lt;P&gt;/* NOTE: Other option are removed below this is used in the code&lt;BR /&gt;#define EX_LOCAL_OBJ_AUTH_ID EX_SSS_AUTH_SE05X_NONE_AUTH_ID&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static sss_status_t sss_se05x_write_user_id(sss_se05x_session_t *pSession,&lt;/P&gt;&lt;P&gt;sss_policy_t *policies, SE05x_MaxAttemps_t maxAttempt, uint32_t objectID,&lt;/P&gt;&lt;P&gt;const uint8_t *userId, size_t userIdLen,&lt;/P&gt;&lt;P&gt;const SE05x_AttestationType_t attestation_type) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Se05xSession_t *pSe05xSession = &amp;amp;pSession-&amp;gt;s_ctx;&lt;/P&gt;&lt;P&gt;Se05xPolicy_t policySet;&lt;/P&gt;&lt;P&gt;size_t valid_policy_buff_len = 0;&lt;/P&gt;&lt;P&gt;uint8_t policies_buff[MAX_POLICY_BUFFER_SIZE];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (policies) {&lt;/P&gt;&lt;P&gt;if (kStatus_SSS_Success&lt;/P&gt;&lt;P&gt;!= sss_se05x_create_object_policy_buffer(policies,&lt;/P&gt;&lt;P&gt;&amp;amp;policies_buff[0], &amp;amp;valid_policy_buff_len)) {&lt;/P&gt;&lt;P&gt;return kStatus_SSS_Fail;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;policySet.value = policies_buff;&lt;/P&gt;&lt;P&gt;policySet.value_len = valid_policy_buff_len;&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;policySet.value = NULL;&lt;/P&gt;&lt;P&gt;policySet.value_len = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;smStatus_t sw_status;&lt;/P&gt;&lt;P&gt;sw_status = Se05x_API_WriteUserID(pSe05xSession, &amp;amp;policySet, maxAttempt,&lt;/P&gt;&lt;P&gt;objectID, userId, userIdLen, attestation_type);&lt;/P&gt;&lt;P&gt;if(sw_status != SM_OK) {&lt;/P&gt;&lt;P&gt;return kStatus_SSS_Fail;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;return kStatus_SSS_Success;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sss_status_t ex_sss_entry(ex_sss_boot_ctx_t *pCtx)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;LOG_I(&lt;/P&gt;&lt;P&gt;"This example is to demonstrate the use of policies for secure "&lt;/P&gt;&lt;P&gt;"objects");&lt;/P&gt;&lt;P&gt;sss_status_t status = kStatus_SSS_Fail;&lt;/P&gt;&lt;P&gt;uint8_t digest[32] = "Hello World";&lt;/P&gt;&lt;P&gt;size_t digestLen = sizeof(digest);&lt;/P&gt;&lt;P&gt;uint8_t signature[ECC_KEY_BIT_LEN] = {0};&lt;/P&gt;&lt;P&gt;size_t signatureLen = sizeof(signature);&lt;/P&gt;&lt;P&gt;sss_asymmetric_t asymm;&lt;/P&gt;&lt;P&gt;sss_object_t object;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sss_algorithm_t algorithm;&lt;/P&gt;&lt;P&gt;sss_mode_t mode;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//status = Se05x_API_DeleteAll(&amp;amp;pCtx);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const uint8_t userid_value[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x56, 0x07 };&lt;/P&gt;&lt;P&gt;const uint8_t userid_value2[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07 };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint32_t keyId = MAKE_TEST_ID(__LINE__);&lt;/P&gt;&lt;P&gt;size_t keylen = ECC_KEY_BIT_LEN / 8;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;algorithm = kAlgorithm_SSS_SHA256;&lt;/P&gt;&lt;P&gt;mode = kMode_SSS_Sign;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pCtx-&amp;gt;se05x_open_ctx.skip_select_applet = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* clang-format off */&lt;/P&gt;&lt;P&gt;/* doc:start:allow-policy-sign */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Logic to pass sign &amp;amp; verifypolicy*/&lt;/P&gt;&lt;P&gt;const int allow_sign = 1;&lt;/P&gt;&lt;P&gt;const int allow_verify = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* doc:start:allow-policy-sign-part1 */&lt;/P&gt;&lt;P&gt;/* Policies for key */&lt;/P&gt;&lt;P&gt;const sss_policy_u key_withPol = {&lt;/P&gt;&lt;P&gt;.type = KPolicy_Asym_Key,&lt;/P&gt;&lt;P&gt;/*Authentication object based on SE05X_AUTH*/&lt;/P&gt;&lt;P&gt;.auth_obj_id = 0x00000001, ///EX_LOCAL_OBJ_AUTH_ID,&lt;/P&gt;&lt;P&gt;.policy = {&lt;/P&gt;&lt;P&gt;/*Asymmetric key policy*/&lt;/P&gt;&lt;P&gt;.asymmkey = {&lt;/P&gt;&lt;P&gt;/*Policy for sign*/&lt;/P&gt;&lt;P&gt;.can_Sign = allow_sign,&lt;/P&gt;&lt;P&gt;/*Policy for verify*/&lt;/P&gt;&lt;P&gt;.can_Verify = allow_verify,&lt;/P&gt;&lt;P&gt;/*Policy for encrypt*/&lt;/P&gt;&lt;P&gt;.can_Encrypt = 0,&lt;/P&gt;&lt;P&gt;/*Policy for decrypt*/&lt;/P&gt;&lt;P&gt;.can_Decrypt = 0,&lt;/P&gt;&lt;P&gt;/*Policy for Key Derivation*/&lt;/P&gt;&lt;P&gt;.can_KD = 0,&lt;/P&gt;&lt;P&gt;/*Policy for wrapped object*/&lt;/P&gt;&lt;P&gt;.can_Wrap = 0,&lt;/P&gt;&lt;P&gt;/*Policy to re-write object*/&lt;/P&gt;&lt;P&gt;.can_Write = 1,&lt;/P&gt;&lt;P&gt;/*Policy for reading object*/&lt;/P&gt;&lt;P&gt;.can_Read = 1,&lt;/P&gt;&lt;P&gt;/*Policy to use object for attestation*/&lt;/P&gt;&lt;P&gt;.can_Attest = 0,&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;const sss_policy_u common = {&lt;/P&gt;&lt;P&gt;.type = KPolicy_Common,&lt;/P&gt;&lt;P&gt;.auth_obj_id = EX_LOCAL_OBJ_AUTH_ID,&lt;/P&gt;&lt;P&gt;.policy = {&lt;/P&gt;&lt;P&gt;.common = {&lt;/P&gt;&lt;P&gt;.req_Sm = 0,&lt;/P&gt;&lt;P&gt;.can_Delete = 1,&lt;/P&gt;&lt;P&gt;.forbid_All = 0,&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;sss_policy_t policy_for_ec_key = {&lt;/P&gt;&lt;P&gt;.nPolicies = 2,&lt;/P&gt;&lt;P&gt;.policies = { &amp;amp;key_withPol, &amp;amp;common }&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;status = sss_se05x_write_user_id(pCtx, &amp;amp;policy_for_ec_key,&lt;/P&gt;&lt;P&gt;SE05x_MaxAttemps_UNLIMITED, keyId, userid_value,&lt;/P&gt;&lt;P&gt;sizeof(userid_value), kSE05x_AttestationType_AUTH);&lt;/P&gt;&lt;P&gt;NOTE: in last getting error here below: SM_ERR_WRONG_DATA(0x6A80)&lt;/P&gt;&lt;P&gt;SUMMARY:&lt;BR /&gt;1) fsl_sss_ftr.h configuration&lt;BR /&gt;2) Session creation with configuration of above file.&lt;BR /&gt;3) write user ID command function called with given policy details in function.&lt;/P&gt;&lt;P&gt;Q: Is my steps are correct, if not then please provide the correct steps and policy details that will be really helpful.&lt;/P&gt;&lt;P&gt;FYI:&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/115338"&gt;@kalpeshbalar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227816"&gt;@Shivangi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Priyank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 19:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1783793#M1482</guid>
      <dc:creator>Spri</dc:creator>
      <dc:date>2024-01-05T19:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1784796#M1485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/223387"&gt;@Spri&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;0x6A80 means&amp;nbsp;the policy validation fails, please kindly check the policy attached to the secure object.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BTW, since you are going to create a UserID, shouldn't the type be&amp;nbsp;KPolicy_UserID instead of&amp;nbsp;KPolicy_Asym_Key?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&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>Tue, 09 Jan 2024 03:07:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1784796#M1485</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2024-01-09T03:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1793200#M1503</link>
      <description>&lt;DIV&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the reply, it is working now.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Currently i am trying to create RSA key with this below function and i am getting error of "SM_ERR_CONDITIONS_NOT_SATISFIED", i just want to know, is there any demo available for key generation(symmetric and asymmetric), i found example in mw but, i guess it uses external keys, and also any document that can help me about how to use sss apis.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-&amp;gt; Function used for rsa key generation:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"status = Se05x_API_WriteRSAKey(pSe05xSession,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;policy_for_rsa_obj,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rsa_temp_id,//RSA_ATTESTATION_KEY_ID,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 512,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_p,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_q,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_dp,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_dq,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_qInv,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_pubExp,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_priv,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SE05X_RSA_NO_pubMod,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;kSE05x_INS_WRITE,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kSE05x_KeyPart_Pair,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;kSE05x_RSAKeyFormat_RAW);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_I("Se05x_API_WriteRSAKey (Attestation key - RSA_ATTESTATION_KEY_ID) status = %04X", status);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Priyank.&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Jan 2024 19:29:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1793200#M1503</guid>
      <dc:creator>Spri</dc:creator>
      <dc:date>2024-01-22T19:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1793495#M1504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/223387"&gt;@Spri&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your example using SE05x APIs should be right , the cause might be related with the policy, how did you set up the policy, was a secure object with the same ID already there? Please kindly clarify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details regarding SSS APIs, please kindly refer to&amp;nbsp;simw-top/doc/sss-apis.html within the MW.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&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>Tue, 23 Jan 2024 06:36:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1793495#M1504</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2024-01-23T06:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1841409#M1582</link>
      <description>Hi kan,&lt;BR /&gt;&lt;BR /&gt;The whole usecase is as below.&lt;BR /&gt;I am getting one certificate from the HOST(microcontroller) in der format after parsing the certificate i am taking public key data from the certificate and want to store in se050, in which i am getting error of SM_ERR_WRONG_DATA.&lt;BR /&gt;&lt;BR /&gt;the values are as below:&lt;BR /&gt;&lt;BR /&gt;Object ID : 0x50a0004, No previous object is over here, fresh user id&lt;BR /&gt;Pub Exp : 1&lt;BR /&gt;Pub Exp len : 3&lt;BR /&gt;pub modulo len : 256&lt;BR /&gt;&lt;BR /&gt;#define try_with_raw_key 1 // Using this method to store the certificate&lt;BR /&gt;&lt;BR /&gt;sss_status_t se_store_certi(ex_sss_boot_ctx_t *pCtx, uint32_t object_id, uint8_t *certi, uint16_t *certi_len)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;sss_status_t status = kStatus_SSS_Success;&lt;BR /&gt;&lt;BR /&gt;sss_object_t cert_object;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;static ex_sss_boot_ctx_t boot_ctx_test;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sss_se05x_session_t *pSession = (sss_se05x_session_t *)&amp;amp;boot_ctx_test.session;&lt;BR /&gt;&lt;BR /&gt;Se05xSession_t *pSe05xSession = &amp;amp;pSession-&amp;gt;s_ctx;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;///////////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;&lt;BR /&gt;* Open session here&lt;BR /&gt;&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;status = ex_sss_boot_open(&amp;amp;boot_ctx_test, NULL);&lt;BR /&gt;&lt;BR /&gt;if (kStatus_SSS_Success != status)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;LOG_E("ex_sss_session_open Failed");&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;status = ex_sss_key_store_and_object_init(&amp;amp;boot_ctx_test);&lt;BR /&gt;&lt;BR /&gt;if (kStatus_SSS_Success != status)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;LOG_E("ex_sss_key_store_and_object_init Failed");&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;///////////////////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int ret = 0;&lt;BR /&gt;&lt;BR /&gt;uint8_t buf[4000];&lt;BR /&gt;&lt;BR /&gt;size_t buf_len = sizeof(buf);&lt;BR /&gt;&lt;BR /&gt;mbedtls_x509_crt cert;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mbedtls_x509_crt_init(&amp;amp;cert);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ret = mbedtls_x509_crt_parse(&amp;amp;cert, (const unsigned char *)cert_array, sizeof(cert_array)+ 1);&lt;BR /&gt;if ((ret == 0)) {&lt;BR /&gt;printf("success in parsing pub key componant%d",ret);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#if try_with_raw_key&lt;BR /&gt;&lt;BR /&gt;status = sss_key_object_init(&amp;amp;cert_object, &amp;amp;boot_ctx_test.ks);&lt;BR /&gt;&lt;BR /&gt;if (kStatus_SSS_Success != status)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;LOG_E("ex_sss_key_store_and_object_init Failed");&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;status = sss_key_object_allocate_handle(&amp;amp;cert_object,&lt;BR /&gt;&lt;BR /&gt;object_id,&lt;BR /&gt;&lt;BR /&gt;kSSS_KeyPart_Public,&lt;BR /&gt;&lt;BR /&gt;kSSS_CipherType_RSA_CRT,&lt;BR /&gt;&lt;BR /&gt;cert.pk_raw.len + 1,&lt;BR /&gt;&lt;BR /&gt;kKeyObject_Mode_Transient);&lt;BR /&gt;&lt;BR /&gt;if (kStatus_SSS_Success != status)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;LOG_E("ex_sss_key_store_and_object_init Failed");&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;status = sss_key_store_set_key(&amp;amp;boot_ctx_test.ks, &amp;amp;cert_object, cert.pk_raw.p, (cert.pk_raw.len + 1), 2048/*(cert.pk_raw.len + 1)*8*/, NULL, 0);&lt;BR /&gt;&lt;BR /&gt;if (kStatus_SSS_Success != status)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;LOG_E("ex_sss_key_store_and_object_init Failed");&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;#if Method_2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* Set the kye parameters */&lt;BR /&gt;&lt;BR /&gt;status = Se05x_API_WriteRSAKey(pSe05xSession,&lt;BR /&gt;&lt;BR /&gt;NULL,&lt;BR /&gt;&lt;BR /&gt;object_id,&lt;BR /&gt;&lt;BR /&gt;2048,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_p,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_q,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_dp,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_dq,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_qInv,&lt;BR /&gt;&lt;BR /&gt;&amp;amp;rsa-&amp;gt;E.p,rsa-&amp;gt;E.n,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_priv,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_pubMod,&lt;BR /&gt;&lt;BR /&gt;kSE05x_INS_NA,&lt;BR /&gt;&lt;BR /&gt;kSSS_KeyPart_Public,&lt;BR /&gt;&lt;BR /&gt;kSSS_CipherType_RSA_CRT);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if (status != SM_OK) {&lt;BR /&gt;&lt;BR /&gt;// retval = kStatus_SSS_Fail;&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;status = Se05x_API_WriteRSAKey(pSe05xSession,&lt;BR /&gt;&lt;BR /&gt;NULL,&lt;BR /&gt;&lt;BR /&gt;object_id,&lt;BR /&gt;&lt;BR /&gt;2048,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_p,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_q,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_dp,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_dq,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_qInv,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_pubExp,&lt;BR /&gt;&lt;BR /&gt;SE05X_RSA_NO_priv,&lt;BR /&gt;&lt;BR /&gt;&amp;amp;rsa-&amp;gt;N.p,rsa-&amp;gt;N.n,&lt;BR /&gt;&lt;BR /&gt;kKeyObject_Mode_Persistent,&lt;BR /&gt;&lt;BR /&gt;kSSS_KeyPart_Public,&lt;BR /&gt;&lt;BR /&gt;kSSS_CipherType_RSA);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if (status != SM_OK) {&lt;BR /&gt;&lt;BR /&gt;// retval = kStatus_SSS_Fail;&lt;BR /&gt;&lt;BR /&gt;goto exit;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;mbedtls_pk_free(&amp;amp;cert.pk);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;exit:&lt;BR /&gt;&lt;BR /&gt;/////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;&lt;BR /&gt;* Close session here&lt;BR /&gt;&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;ex_sss_session_close((&amp;amp;boot_ctx_test));&lt;BR /&gt;&lt;BR /&gt;////////////////////////////////////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return status;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;&amp;nbsp; thanks in advance.</description>
      <pubDate>Fri, 05 Apr 2024 16:16:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1841409#M1582</guid>
      <dc:creator>Spri</dc:creator>
      <dc:date>2024-04-05T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: SE050: received error in write user-id command</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1929564#M1657</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Is there anything else that required for RSA like ecc key required the curve?&lt;/P&gt;&lt;P&gt;I have also tried the sss example and result is the same, can you please help me with this.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 14:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-received-error-in-write-user-id-command/m-p/1929564#M1657</guid>
      <dc:creator>spriyank2212</dc:creator>
      <dc:date>2024-08-10T14:51:20Z</dc:date>
    </item>
  </channel>
</rss>

