interface SE050 with nordic controller using I2C and generate AES 128 Key

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

interface SE050 with nordic controller using I2C and generate AES 128 Key

452 Views
AnilRathod
Contributor II

How to communicate SE050 with  nordic controller using I2C? if any driver or reference code is available then please provide.

also how to generate AES 128 key and store in SE050?

 

Labels (1)
0 Kudos
Reply
8 Replies

418 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @AnilRathod ,

 

Actually nordic controller is not supported by the MW, but maybe you can start with the nano package and port it to nordic controller by yourself. Please kindly refer to https://github.com/NXPPlugNTrust/nano-package for details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

403 Views
AnilRathod
Contributor II
Hi @Kan_Li ,
Thank you for your response,
To generate an AES 128 key using the SE050 over I2C, do I need to know the I2C register address values? If so, could you please provide a list of these addresses? Additionally, is STM32 controller support included in the Middleware (MW)? If yes, could you provide a reference code?
0 Kudos
Reply

384 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @AnilRathod ,

 

No, SE05x has no registers inside, you just have to issue APDU commands to the device following the T=1 Over I2C Spec which you need not investigate if you develop your application based on the MW which already includes the implementation. 

 

STM32 is not supported by the MW either, if you want to use STM32 instead, you still have to do the porting.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

370 Views
AnilRathod
Contributor II

Hi @Kan_Li ,
Thank you for your response,

I am referring to the WriteSymmKey command from the SE050 APDU specification document to create C-APDU commands for AES 128 key creation and writing into the SE050.

I have some questions regarding the parameters of the WriteSymmKey command.

int8_t AES128[12] = {
0x5A, // NAD
?, // PCB
?, // LEN
0x03, // P1
0x00, // P2
?,// TLV[TAG_POLICY]?
?, //TLV[TAG_MAX_ATTEMPTS]?
?,//TLV[TAG_1]?
?,//TLV[TAG_2]?
?,//TLV[TAG_3]?
?,// CRC1
?// CRC2 };

(1)Which PCB Value I Want to Take for create and write AES 128?
(2)How to Calculate the LEN?
(3)which value i want to take for TLV[TAG_POLICY],TLV[TAG_MAX_ATTEMPTS],TLV[TAG_1],TLV[TAG_2],TLV[TAG_3]?
(4)How to Calculate the CRC1 & CRC2?

0 Kudos
Reply

329 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @AnilRathod ,

 

Please kindly refer to https://www.nxp.com/webapp/Download?colCode=AN12543 and https://www.nxp.com/webapp/Download?colCode=UM11225 for details.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

323 Views
AnilRathod
Contributor II
Hi @Kan_Li ,
Thank you for your response,

I reviewed documents AN12543 and UM11225, and used them to create an array for storing values.
for generate & write AES 128 key below T=1 & APDU parameter is right or not?

please help me to create the AES 128 key.
uint8_t AES128[18] = {
0x5A, // NAD
?, // PCB
?, // LEN
0x80,//CLA
0x01,//INS
0x03, // P1
0x00, // P2
?,// TLV[TAG_POLICY]?
?,//TLV[TAG_POLICY_CHECK]?
?, // TLV[TAG_MAX_ATTEMPTS]?
?,//TLV[TAG_1]?
?,//TLV[TAG_2]?
?,//TLV[TAG_3]?
?,//TLV[TAG_4]?
?,//TLV[TAG_5]?
?,//TLV[TAG_11]?
?,// CRC1?
?// CRC2 ?};  
(1)Which PCB Value I Want to Take for create and write AES 128?
(2)How to Calculate the LEN?
(3)which value i want to take for TLV[TAG_POLICY],TLV[TAG_POLICY_CHECK],
TLV[TAG_MAX_ATTEMPTS],TLV[TAG_1],TLV[TAG_2],TLV[TAG_3],TLV[TAG_4],TLV[TAG_5],TLV[TAG_11]?
(4)How to Calculate the CRC1 & CRC2?
0 Kudos
Reply

202 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @AnilRathod ,

 

It is not recommended using raw APDU command in your application, as it can be easily probed via the I2C lines, you have to secure the channel at first, and such kind of functionalities have all been implemented in the MW(https://www.nxp.com/webapp/Download?colCode=SE05x-PLUG-TRUST-MW&appType=license ), you may simply develop your own application code based on the MW which will help you with the command frame construction , no need to take additional time to develop another similar MW.  

 

If you think the full MW is too complicated to port, you may start with the nano version, https://github.com/NXPPlugNTrust/nano-package , as I mentioned before.  Please kindly refer to the following for more details.

Kan_Li_0-1726815741707.png

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply

254 Views
AnilRathod
Contributor II
I hope NXP will respond to my query as soon as possible.
0 Kudos
Reply