What K-ENC key, SE050 dev. board (OM-SE050ARD) uses to generate card cryptogram for SCP03?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

What K-ENC key, SE050 dev. board (OM-SE050ARD) uses to generate card cryptogram for SCP03?

979 次查看
Raza
Contributor II

Hello @Kan_Li 

I have a microcontroller(msp430) and a smartcard(se050), and I am sending APDUs from micro controller to the smartcard using Code Composer Studio on my windows computer.

I am trying to create a secure channel (SCP03) using AES symmetry key. I have created a session using this AES key on the smart card and now to perform mutual authentication I have sent 'INITIALIZE UPDATE' command APDU to smart card

Initialize Update APDU:

80 50 00 00 08 00 00 00 00 00 00 00 00 00

And the response from the card is:

00 00 00 00 00 00 00 00 00 00 00 03 60 7E 25 31 3D BE 63 59 BE 34 AA 4B C0 F2 B9 27 B4

where

00 00 00 00 00 00 00 00 00 00  = Key Diversification Data
00 03 60  = Key information

7E 25 31 3D BE 63 59 BE  = card challenge

34 AA 4B C0 F2 B9 27 B4  = card cryptogram

 

Now, I want to check if card cryptogram is correct or NOT? For that I need to create secret session keys (S-ENC, S-MAC, S-DEK) and the card cryptogram in order to authenticate the card.

And I am not sure what is the static K-ENC key, my se050 development board (OM-SE050ARD) is using?

I have found a document https://www.nxp.com/docs/en/application-note/AN12436.pdf (page 5), where the list of some static keys for se050ARD is given, but I am not able to verify my card cryptogram using any of these keys.

Also I need to create 'Host Cryptogram' that I need to resend to the smart card in 'EXTERNAL AUTHENTICATE' command.

How can I generate these things in code composer? Are there any C-libraries that I can import in my codes to generate these keys and cryptograms?

 

0 项奖励
回复
1 回复

965 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Raza ,

 

OM-SE050ARD has the keys as shown below:

static keys.png

We have provide MW to support the SCP03 communication, and a porting guide for your reference, please kindly refer to the following links for details.

https://www.nxp.com/webapp/Download?colCode=SE050-PLUG-TRUST-MW

https://www.nxp.com/docs/en/application-note/AN12448.pdf

 

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 项奖励
回复