Hi @Kan_Li, with your previous solution, The problem was solved and I could compile and execute it using the SE050 on a raspberry pi. My actual target is a device running openwrt. I've already cross-compiled the middleware and executed the examples on the target and they all work fine. Good to mention that I successfully executed the symmetric example. Now that the problem is solved, only on the target I am getting the following errors when executing on the board. I've seen a similar post (EdgeLock SE050 OpenSSL, pkcs11-tool, and SM_Connect Failed. Status 7012) which faces the same error but in a different context. I don't think the solution there works for me too. Here's the error I get:
App :INFO :PlugAndTrust_v04.03.01_20230203
App :INFO :Running ./ex_symmetric
App :INFO :Using PortName='/dev/i2c-0:0x48' (CLI)
App :INFO :Using default PlatfSCP03 keys. You can use keys from file using ENV=EX_SSS_BOOT_SCP03_PATH
sss :INFO :atr (Len=35)
01 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 00
01 00 00 00 00 64 13 88 0A 00 65 53 45 30 35 31
00 00 00
sss :INFO :tlvGet_u8buf: I've reached here**!
sss :INFO :DoAPDUTxRx_s_Case4_ext: I've reached here it's OK!
App :INFO :Running AES symmetric Example ex_sss_symmetric.c
App :INFO :Do Encryption
App :INFO :iv (Len=16)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
App :INFO :srcData (Len=16)
48 45 4C 4C 4F 48 45 4C 4C 4F 48 45 4C 4C 4F 31
sss :INFO :SE05 being returned
smCom :ERROR:PAL Read status error status = ff
smCom :ERROR:phNxpEseProto7816_GetRawFrame phNxpEse_read failed , status : 0xff
smCom :ERROR:phNxpEseProto7816_ProcessResponse phNxpEseProto7816_GetRawFrame failed starting recovery
smCom :ERROR:Failed writing data (nrWritten=-1).
smCom :ERROR: - Error in I2C Write.....
smCom :ERROR:phNxpEseProto7816_SendRawFrame Error phNxpEse_WriteFrame
smCom :ERROR:TransceiveProcess Transceive send failed, going to recovery!
smCom :ERROR:phNxpEseProto7816_Transceive Transceive failed, hard reset to proceed
smCom :ERROR: phNxpEse_Transceive phNxpEseProto7816_Transceive- Failed
smCom :ERROR: Transcive Failed
sss :WARN :nxEnsure:'retStatus == SM_OK' failed. At Line:7131 Function:sss_se05x_channel_txn
sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:7026 Function:sss_se05x_TXn
sss :WARN :nxEnsure:'status == SM_OK' failed. At Line:6082 Function:sss_se05x_aead_one_go
App :WARN :nxEnsure:'status == kStatus_SSS_Success' failed. At Line:198 Function:ex_sss_entry
App :ERROR:ex_sss_symmetric Example Failed !!!...
App :INFO :ex_sss Finished
App :ERROR:ex_sss_entry Failed
smCom :ERROR:Failed writing data (nrWritten=-1).
smCom :ERROR: - Error in I2C Write.....
smCom :ERROR:phNxpEseProto7816_SendRawFrame Error phNxpEse_WriteFrame
smCom :ERROR:TransceiveProcess Transceive send failed, going to recovery!
smCom :ERROR:phNxpEseProto7816_Close TransceiveProcess failed
smCom :ERROR:Failed to close session
App :ERROR:!ERROR! ret != 0.
Could you please help me with that! The strange thing is that I don't have the same problem for symmetric example. Could it be some specific config is needed for aead. I've also checked that I have the same config in (fsl_sss_ftr.h) for both raspberry pi and the cross-compiled one.