SE050 - cardCryptogram don't match

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

SE050 - cardCryptogram don't match

Jump to solution
7,711 Views
ElielderBMelo
Contributor I

I'm working with OpenSSL Engine + SE050 in a Embedded Linux. In SCP Authentication, I cannot initialize the device, when I reach:

// Verify whether the 8 left most byte of cardCryptogramFullLength match cardCryptogram
if (memcmp(cardCryptogramFullLength, cardCryptogram, SCP_GP_IU_CARD_CRYPTOGRAM_LEN) != 0)
status = kStatus_SSS_Fail;

cardCryptogramFullLength and cardCryptogram don´t match and I'm already using:

  • ENC is 35C29245895EA34F6136155F8209D6CD

  • MAC is AF172D5D54F7C0D5C10A05B9F1207F78

  • DEK is A2BC8438BF77015B361A4425F239FA29

They are set in file by the environment variable, by command:

EX_SSS_BOOT_SCP03_PATH=/home/root/plain_scp.txt openssl engine

By the end, I output the DEBUG in console, they presented as following:

scp :DEBUG: Output:cardCryptogramFullLength (Len=16)
B8 78 A9 C7 DB EE 3D 01 5A 5C 72 20 13 9E F2 74
scp :DEBUG: Output:cardCryptogram (Len=8)
27 C3 C1 F6 2D 0A E8 EA

Any solution? Why they don't match. I have attached console output.

Thanks!!!

Labels (1)
0 Kudos
1 Solution
7,564 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Thanks for the information! I have just checked with the expert, from the ATR info, looks like SE050F2 is on your board, and it uses different SCP03 keys as the default ones on the dev kits.

Kan_Li_0-1639664302567.png

Please use the above keys instead and check if they make any difference. Please refer to https://www.nxp.com/docs/en/application-note/AN12436.pdf for more details.

 

You may also switch on FIPS option to make the MW built for the SE050F IoT Applet which is version 3.6.

Kan_Li_1-1639665477589.png

 

of course it is not the root cause, but makes sense. It just slightly modifies the behavior of some examples.

 

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.
-------------------------------------------------------------------------------

 



 

View solution in original post

0 Kudos
20 Replies
7,693 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Are you using the development board? 

If yes, Did you change the SCP03 keys? Because our default keys are:

Kan_Li_0-1639100572544.png

 

Please kindly refer to simw-top/doc/appendix/platfscp.html?highlight=scp03 for more 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
7,679 Views
ElielderBMelo
Contributor I

Hi, @Kan_Li 

Yes, I'm using the development board.

No, I'm using exactly this keys:

ENC 35C256458958A34F6136155F8209D6CD
MAC AF177D5DBDF7C0D5C10A05B9F1607F78
DEK A1BC8438BF77935B361A4425FE79FA29

Thanks.

0 Kudos
7,636 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Since the dev kit still holds the default keys, so it should work with any demo code with Applet SCP03 Authentication enabled. Did you try it from your side? 

To do this, you have to run cmake-gui . to enter the configuration view for cmake, and change the following options.

Kan_Li_0-1639476072424.png

Kan_Li_1-1639476121390.png

then configure and generate

Kan_Li_5-1639477069059.png

 

and run cmake --build .

Kan_Li_6-1639477120330.png

 

if you meet the following issue when running any demo,

Kan_Li_2-1639476201712.png

please execute se05x_Delete_and_test_provision.exe at first to provision the Authentication Key.

Kan_Li_3-1639476750291.png

With the default SCP03 keys, you may run any demo starting with an Applet SCP03 authentication like below.

Kan_Li_4-1639476879180.png

 

If you run the demo following above steps, it means the dev kit on your hands should be ok, we should focus on the host application instead.

 

Hope that makes sense,

 

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
7,629 Views
ElielderBMelo
Contributor I

Hi, Kan Li.

I'm not working in Windows, I'm working in Embedded Linux and I took the .bin in MCU folder in "simw-top/binaries/MCU/" and no one of them worked in my environment.

ElielderBMelo_0-1639485836300.png

Attached to this message there is my C-Make configuration file. My environment configuration are shown there.

For your knowledge:

- I'm building a cross compiled library to work with OpenSSL.

- My library are attached to OpenSSL by the "openssl.cnf" file.

- The command that I'm testing is a simple engine operation, only to connect to the device by "openssl engine -t".

- This command above are working with no SCP03 Authentication, but when SCP03 is required it doesn't work well.

- I enabled the SCP03 by following manual and instructions there.

- And I don't what to do for that values of "cardCryptogram" to match between each other

Please, ask if any doubt remains, I need to hurry in trying to fix it, because my project are to be delayed because of that. 

Thanks.

 

Thanks.

0 Kudos
7,623 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

I've found the executable for Linux and I executed se05x_Minimal and se05_GetInfo, and they stopped in the same part. They cannot establish a SCP03 Secure Channel as shown below:

 

root@am335x-evm:~# ./se05x_Minimal
App :INFO :PlugAndTrust_v03.03.00_20210528
App :INFO :Running ./se05x_Minimal
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
App :DEBUG:Using File: /home/root/plain_scp.txt
App :WARN :Using SCP03 keys from:'/home/root/plain_scp.txt' (FILE=/home/root/plain_scp.txt)
smCom :DEBUG:phPalEse_i2c_open_and_configure Opening port
smCom :DEBUG:I2CInit: opening /dev/i2c-2

smCom :DEBUG:I2C driver: PEC flag cleared

smCom :DEBUG:I2C driver supports plain i2c-level commands.

smCom :DEBUG:I2C driver Initialized :: fd = [12]
smCom :DEBUG:phNxpEseProto7816_Open: First open completed
smCom :DEBUG:phNxpEse_clearReadBuffer Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 260 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=260)
43 21 01 00 70 99 37 49 00 00 00 00 74 58 EE BE
14 58 EE BE 1C 58 EE BE B3 76 35 49 1C 58 EE BE
D0 9A 37 49 04 00 00 00 78 DE F6 B6 01 00 00 00
00 00 00 00 01 00 00 00 70 99 37 49 00 00 00 00
2C 9B 37 49 2C 9B 37 49 00 00 00 00 01 80 AD FB
20 59 EE BE 20 59 EE BE 20 59 EE BE 20 59 EE BE
FF FF FF FF 1E 5A EE BE 40 A3 38 49 20 D8 F6 B6
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 05 00 00 00 01 00 00 00 04 B1 05 00
10 B0 F6 B6 D0 B4 F6 B6 00 00 00 00 01 00 00 00
00 90 37 49 00 00 00 00 DF B0 35 49 78 DE F6 B6
01 00 00 00 01 00 00 00 00 00 00 00 10 B0 F6 B6
40 A3 38 49 08 59 EE BE 00 B0 05 00 B0 58 EE BE
57 4C 3F 49 88 13 00 00 E8 03 00 00 40 42 0F 00
39 46 41 49 00 00 00 00 40 4B 4C 00 00 B0 05 00
42 5B EE BE 00 00 00 00 F3 D8 03 00 C4 58 EE BE
05 00 00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:TransceiveProcess nextTransceiveState 4
smCom :DEBUG:S-Frame PCB: c0
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C0 00 FF FC
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C0 00 FF FC
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E0
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
3F 19
smCom :DEBUG:RAW Rx< (Len=5)
A5 E0 00 3F 19
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x60dd8 len ----> 0x5
smCom :DEBUG:Received CRC:0x3f19 Calculated CRC:0x3f19
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:TransceiveProcess nextTransceiveState 7
smCom :DEBUG:S-Frame PCB: c7
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E7
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
23
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 37 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=37)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F 2A 8D
smCom :DEBUG:RAW Rx< (Len=40)
A5 E7 23 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B
03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50
34 20 41 54 50 4F 2A 8D
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x60dd8 len ----> 0x28
smCom :DEBUG:Received CRC:0x2a8d Calculated CRC:0x2a8d
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeSFrameData frameoffset=3 value=0x0
smCom :DEBUG:Data[0]=0x0 len=35 Data[34]=0x50 Data[79]=0x23
smCom :DEBUG:Trying to Acquire Lock thread: -1225347056
smCom :DEBUG:LOCK Acquired by thread: -1225347056
smCom :DEBUG:APDU Tx> (Len=22)
00 A4 04 00 10 A0 00 00 03 96 54 53 00 00 00 01
03 00 00 00 00 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeee5438 len:22
smCom :DEBUG:I-Frame Data Len: 22 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
09
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 11 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=11)
03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:RAW Rx< (Len=14)
A5 00 09 03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x60dd8 len ----> 0xe
smCom :DEBUG:Received CRC:0x50ad Calculated CRC:0x50ad
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x3 len=9 Data[8]=0x90 Data[0]=0x9
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=9)
03 06 00 61 D2 01 0B 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1225347056
smCom :DEBUG:LOCK Released by thread: -1225347056
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :INFO :Newer version of Applet Found
sss :INFO :Compiled for 0x30100. Got newer 0x30600
scp :DEBUG:FN: nxScp03_AuthenticateChannel
scp :DEBUG: Output: hostChallenge (Len=8)
3B 37 1C 2A 1B 02 FE A2
scp :DEBUG:FN: nxScp03_GP_InitializeUpdate
scp :DEBUG:Input:keyVersion 0b
scp :DEBUG: Input: hostChallenge (Len=8)
3B 37 1C 2A 1B 02 FE A2
scp :DEBUG:Sending GP Initialize Update Command !!!
smCom :DEBUG:Trying to Acquire Lock thread: -1225347056
smCom :DEBUG:LOCK Acquired by thread: -1225347056
smCom :DEBUG:APDU Tx> (Len=13)
80 50 0B 00 08 3B 37 1C 2A 1B 02 FE A2
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeee5164 len:13
smCom :DEBUG:I-Frame Data Len: 13 Seq. no:1
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=18)
5A 40 0D 80 50 0B 00 08 3B 37 1C 2A 1B 02 FE A2
5A 4E
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=18)
5A 40 0D 80 50 0B 00 08 3B 37 1C 2A 1B 02 FE A2
5A 4E
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 40
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
1F
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 33 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=33)
90 03 12 10 00 00 49 95 55 95 0B 03 00 9E EB B4
D2 0C EA 7D AE 21 0B 23 F0 BD 04 C9 03 90 00 B0
EB
smCom :DEBUG:RAW Rx< (Len=36)
A5 40 1F 90 03 12 10 00 00 49 95 55 95 0B 03 00
9E EB B4 D2 0C EA 7D AE 21 0B 23 F0 BD 04 C9 03
90 00 B0 EB
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x60dd8 len ----> 0x24
smCom :DEBUG:Received CRC:0xb0eb Calculated CRC:0xb0eb
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x1
smCom :DEBUG:Data[0]=0x90 len=31 Data[30]=0x90 Data[0]=0x1f
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=31)
90 03 12 10 00 00 49 95 55 95 0B 03 00 9E EB B4
D2 0C EA 7D AE 21 0B 23 F0 BD 04 C9 03 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1225347056
smCom :DEBUG:LOCK Released by thread: -1225347056
scp :DEBUG: Output: keyDivData (Len=10)
90 03 12 10 00 00 49 95 55 95
scp :DEBUG: Output: keyInfo (Len=3)
0B 03 00
scp :DEBUG: Output: cardChallenge (Len=8)
9E EB B4 D2 0C EA 7D AE
scp :DEBUG: Output: cardCryptoGram (Len=8)
21 0B 23 F0 BD 04 C9 03
scp :DEBUG:FN: nxScp03_HostLocal_CalculateSessionKeys
scp :DEBUG: Input:hostChallenge (Len=8)
3B 37 1C 2A 1B 02 FE A2
scp :DEBUG: Input:cardChallenge (Len=8)
9E EB B4 D2 0C EA 7D AE
scp :DEBUG:Set the Derviation data to generate Session ENC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 04
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG: Output:outSignature (Len=16)
42 E3 9B ED C5 0C 15 80 C7 C5 F4 62 7B 2A 2F 6D
scp :DEBUG: Output:sessionEncKey (Len=16)
42 E3 9B ED C5 0C 15 80 C7 C5 F4 62 7B 2A 2F 6D
scp :DEBUG:Set the Derviation data to generate Session MAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 06
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG: Output:outSignature (Len=16)
7D 26 00 93 2C 20 90 7F 1F E1 30 37 38 C1 65 21
scp :DEBUG: Output:sessionMacKey (Len=16)
7D 26 00 93 2C 20 90 7F 1F E1 30 37 38 C1 65 21
scp :DEBUG:Set the Derviation data to generate Session RMAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 07
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG: Output:outSignature (Len=16)
14 13 13 F9 D9 1D 98 91 72 4C C4 16 64 CB 31 67
scp :DEBUG: Output:sessionRmacKey (Len=16)
14 13 13 F9 D9 1D 98 91 72 4C C4 16 64 CB 31 67
scp :DEBUG:FN: nxScp03_HostLocal_VerifyCardCryptogram
scp :DEBUG: Input:hostChallenge (Len=8)
3B 37 1C 2A 1B 02 FE A2
scp :DEBUG: Input:cardChallenge (Len=8)
9E EB B4 D2 0C EA 7D AE
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 00
scp :DEBUG:Input:ddL 40
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
3B 37 1C 2A 1B 02 FE A2 9E EB B4 D2 0C EA 7D AE
scp :DEBUG: Output:outSignature (Len=16)
77 4F 5E 11 CC 39 55 05 2A 15 B5 5A 71 DA 33 C8
scp :DEBUG: Output:cardCryptogram (Len=16)
77 4F 5E 11 CC 39 55 05 2A 15 B5 5A 71 DA 33 C8
scp :WARN :nxEnsure:'status == kStatus_SSS_Success' failed. At Line:145 Function:nxScp03_AuthenticateChannel
sss :ERROR:Could not set SCP03 Secure Channel
App :ERROR:sss_session_open failed
App :ERROR:ex_sss_session_open Failed
App :ERROR:!ERROR! ret != 0.

 

root@am335x-evm:~# ./se05x_GetInfo
App :INFO :PlugAndTrust_v03.03.00_20210528
App :INFO :Running ./se05x_GetInfo
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
App :DEBUG:Using File: /home/root/plain_scp.txt
App :WARN :Using SCP03 keys from:'/home/root/plain_scp.txt' (FILE=/home/root/plain_scp.txt)
smCom :DEBUG:phPalEse_i2c_open_and_configure Opening port
smCom :DEBUG:I2CInit: opening /dev/i2c-2

smCom :DEBUG:I2C driver: PEC flag cleared

smCom :DEBUG:I2C driver supports plain i2c-level commands.

smCom :DEBUG:I2C driver Initialized :: fd = [12]
smCom :DEBUG:phNxpEseProto7816_Open: First open completed
smCom :DEBUG:phNxpEse_clearReadBuffer Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 260 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=260)
5B 21 01 00 70 99 37 49 00 00 00 00 74 C8 CE BE
14 C8 CE BE 1C C8 CE BE B3 76 35 49 1C C8 CE BE
D0 9A 37 49 04 00 00 00 78 4E F5 B6 01 00 00 00
00 00 00 00 01 00 00 00 70 99 37 49 00 00 00 00
2C 9B 37 49 2C 9B 37 49 00 00 00 00 01 80 AD FB
20 C9 CE BE 20 C9 CE BE 20 C9 CE BE 20 C9 CE BE
FF FF FF FF 1E CA CE BE 40 A3 38 49 20 48 F5 B6
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 05 00 00 00 01 00 00 00 04 D1 05 00
10 20 F5 B6 D0 24 F5 B6 00 00 00 00 01 00 00 00
00 90 37 49 00 00 00 00 DF B0 35 49 78 4E F5 B6
01 00 00 00 01 00 00 00 00 00 00 00 10 20 F5 B6
40 A3 38 49 08 C9 CE BE 00 D0 05 00 B0 C8 CE BE
57 4C 3F 49 88 13 00 00 E8 03 00 00 40 42 0F 00
39 46 41 49 00 00 00 00 40 4B 4C 00 00 D0 05 00
42 CB CE BE 00 00 00 00 AF EA 03 00 C4 C8 CE BE
05 00 00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:TransceiveProcess nextTransceiveState 4
smCom :DEBUG:S-Frame PCB: c0
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C0 00 FF FC
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C0 00 FF FC
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E0
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
3F 19
smCom :DEBUG:RAW Rx< (Len=5)
A5 E0 00 3F 19
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x62dd8 len ----> 0x5
smCom :DEBUG:Received CRC:0x3f19 Calculated CRC:0x3f19
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:TransceiveProcess nextTransceiveState 7
smCom :DEBUG:S-Frame PCB: c7
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E7
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
23
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 37 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=37)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F 2A 8D
smCom :DEBUG:RAW Rx< (Len=40)
A5 E7 23 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B
03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50
34 20 41 54 50 4F 2A 8D
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x62dd8 len ----> 0x28
smCom :DEBUG:Received CRC:0x2a8d Calculated CRC:0x2a8d
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeSFrameData frameoffset=3 value=0x0
smCom :DEBUG:Data[0]=0x0 len=35 Data[34]=0x50 Data[79]=0x23
smCom :DEBUG:Trying to Acquire Lock thread: -1225449456
smCom :DEBUG:LOCK Acquired by thread: -1225449456
smCom :DEBUG:APDU Tx> (Len=22)
00 A4 04 00 10 A0 00 00 03 96 54 53 00 00 00 01
03 00 00 00 00 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbecec438 len:22
smCom :DEBUG:I-Frame Data Len: 22 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
09
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 11 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=11)
03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:RAW Rx< (Len=14)
A5 00 09 03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x62dd8 len ----> 0xe
smCom :DEBUG:Received CRC:0x50ad Calculated CRC:0x50ad
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x3 len=9 Data[8]=0x90 Data[0]=0x9
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=9)
03 06 00 61 D2 01 0B 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1225449456
smCom :DEBUG:LOCK Released by thread: -1225449456
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :INFO :Newer version of Applet Found
sss :INFO :Compiled for 0x30100. Got newer 0x30600
scp :DEBUG:FN: nxScp03_AuthenticateChannel
scp :DEBUG: Output: hostChallenge (Len=8)
E2 B5 B2 C2 C7 A8 A6 63
scp :DEBUG:FN: nxScp03_GP_InitializeUpdate
scp :DEBUG:Input:keyVersion 0b
scp :DEBUG: Input: hostChallenge (Len=8)
E2 B5 B2 C2 C7 A8 A6 63
scp :DEBUG:Sending GP Initialize Update Command !!!
smCom :DEBUG:Trying to Acquire Lock thread: -1225449456
smCom :DEBUG:LOCK Acquired by thread: -1225449456
smCom :DEBUG:APDU Tx> (Len=13)
80 50 0B 00 08 E2 B5 B2 C2 C7 A8 A6 63
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbecec164 len:13
smCom :DEBUG:I-Frame Data Len: 13 Seq. no:1
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=18)
5A 40 0D 80 50 0B 00 08 E2 B5 B2 C2 C7 A8 A6 63
61 B7
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=18)
5A 40 0D 80 50 0B 00 08 E2 B5 B2 C2 C7 A8 A6 63
61 B7
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 40
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
1F
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 33 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=33)
90 03 12 10 00 00 49 95 55 95 0B 03 00 16 35 AD
77 94 F9 C2 33 D9 23 B6 1F 93 2F 97 4E 90 00 C0
97
smCom :DEBUG:RAW Rx< (Len=36)
A5 40 1F 90 03 12 10 00 00 49 95 55 95 0B 03 00
16 35 AD 77 94 F9 C2 33 D9 23 B6 1F 93 2F 97 4E
90 00 C0 97
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x62dd8 len ----> 0x24
smCom :DEBUG:Received CRC:0xc097 Calculated CRC:0xc097
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x1
smCom :DEBUG:Data[0]=0x90 len=31 Data[30]=0x90 Data[0]=0x1f
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=31)
90 03 12 10 00 00 49 95 55 95 0B 03 00 16 35 AD
77 94 F9 C2 33 D9 23 B6 1F 93 2F 97 4E 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1225449456
smCom :DEBUG:LOCK Released by thread: -1225449456
scp :DEBUG: Output: keyDivData (Len=10)
90 03 12 10 00 00 49 95 55 95
scp :DEBUG: Output: keyInfo (Len=3)
0B 03 00
scp :DEBUG: Output: cardChallenge (Len=8)
16 35 AD 77 94 F9 C2 33
scp :DEBUG: Output: cardCryptoGram (Len=8)
D9 23 B6 1F 93 2F 97 4E
scp :DEBUG:FN: nxScp03_HostLocal_CalculateSessionKeys
scp :DEBUG: Input:hostChallenge (Len=8)
E2 B5 B2 C2 C7 A8 A6 63
scp :DEBUG: Input:cardChallenge (Len=8)
16 35 AD 77 94 F9 C2 33
scp :DEBUG:Set the Derviation data to generate Session ENC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 04
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG: Output:outSignature (Len=16)
F2 F2 CD D3 0C C1 23 64 73 41 DD 04 4B B8 07 1F
scp :DEBUG: Output:sessionEncKey (Len=16)
F2 F2 CD D3 0C C1 23 64 73 41 DD 04 4B B8 07 1F
scp :DEBUG:Set the Derviation data to generate Session MAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 06
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG: Output:outSignature (Len=16)
6B 55 86 C0 17 65 09 9A EC C0 76 4C 09 B2 3A DA
scp :DEBUG: Output:sessionMacKey (Len=16)
6B 55 86 C0 17 65 09 9A EC C0 76 4C 09 B2 3A DA
scp :DEBUG:Set the Derviation data to generate Session RMAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 07
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG: Output:outSignature (Len=16)
8E 85 F4 80 FD 9F 08 0F AB 6E C9 4A AE 32 C5 1B
scp :DEBUG: Output:sessionRmacKey (Len=16)
8E 85 F4 80 FD 9F 08 0F AB 6E C9 4A AE 32 C5 1B
scp :DEBUG:FN: nxScp03_HostLocal_VerifyCardCryptogram
scp :DEBUG: Input:hostChallenge (Len=8)
E2 B5 B2 C2 C7 A8 A6 63
scp :DEBUG: Input:cardChallenge (Len=8)
16 35 AD 77 94 F9 C2 33
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 00
scp :DEBUG:Input:ddL 40
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
E2 B5 B2 C2 C7 A8 A6 63 16 35 AD 77 94 F9 C2 33
scp :DEBUG: Output:outSignature (Len=16)
EE 4C A8 23 C7 2E 07 35 32 31 47 4F 32 51 15 B1
scp :DEBUG: Output:cardCryptogram (Len=16)
EE 4C A8 23 C7 2E 07 35 32 31 47 4F 32 51 15 B1
scp :WARN :nxEnsure:'status == kStatus_SSS_Success' failed. At Line:145 Function:nxScp03_AuthenticateChannel
sss :ERROR:Could not set SCP03 Secure Channel
App :ERROR:sss_session_open failed
App :ERROR:ex_sss_session_open Failed
App :ERROR:!ERROR! ret != 0.

 

Thanks.

0 Kudos
7,620 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

Please, look to this execution of "se05X_GetInfo", this build was built without SCP03 Authentication in C-Make config for libsss_engine.so.

 


root@am335x-evm:~# ./se05x_GetInfo
App :INFO :PlugAndTrust_v03.03.00_20210528
App :INFO :Running ./se05x_GetInfo
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
smCom :DEBUG:phPalEse_i2c_open_and_configure Opening port
smCom :DEBUG:I2CInit: opening /dev/i2c-2

smCom :DEBUG:I2C driver: PEC flag cleared

smCom :DEBUG:I2C driver supports plain i2c-level commands.

smCom :DEBUG:I2C driver Initialized :: fd = [12]
smCom :DEBUG:phNxpEseProto7816_Open: First open completed
smCom :DEBUG:phNxpEse_clearReadBuffer Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 260 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=260)
5B 21 01 00 70 99 37 49 00 00 00 00 84 58 B6 BE
24 58 B6 BE 2C 58 B6 BE B3 76 35 49 2C 58 B6 BE
D0 9A 37 49 04 00 00 00 78 2E FF B6 01 00 00 00
00 00 00 00 01 00 00 00 70 99 37 49 00 00 00 00
2C 9B 37 49 2C 9B 37 49 00 00 00 00 01 80 AD FB
30 59 B6 BE 30 59 B6 BE 30 59 B6 BE 30 59 B6 BE
FF FF FF FF 2E 5A B6 BE 40 A3 38 49 20 28 FF B6
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 05 00 00 00 01 00 00 00 04 D1 05 00
10 00 FF B6 D0 04 FF B6 00 00 00 00 01 00 00 00
00 90 37 49 00 00 00 00 DF B0 35 49 78 2E FF B6
01 00 00 00 01 00 00 00 00 00 00 00 10 00 FF B6
40 A3 38 49 18 59 B6 BE 00 D0 05 00 C0 58 B6 BE
57 4C 3F 49 88 13 00 00 E8 03 00 00 40 42 0F 00
39 46 41 49 00 00 00 00 40 4B 4C 00 00 D0 05 00
52 5B B6 BE 00 00 00 00 FF E6 03 00 D4 58 B6 BE
05 00 00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:TransceiveProcess nextTransceiveState 4
smCom :DEBUG:S-Frame PCB: c0
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C0 00 FF FC
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C0 00 FF FC
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E0
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
3F 19
smCom :DEBUG:RAW Rx< (Len=5)
A5 E0 00 3F 19
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x5
smCom :DEBUG:Received CRC:0x3f19 Calculated CRC:0x3f19
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:TransceiveProcess nextTransceiveState 7
smCom :DEBUG:S-Frame PCB: c7
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E7
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
23
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 37 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=37)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F 2A 8D
smCom :DEBUG:RAW Rx< (Len=40)
A5 E7 23 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B
03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50
34 20 41 54 50 4F 2A 8D
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x28
smCom :DEBUG:Received CRC:0x2a8d Calculated CRC:0x2a8d
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeSFrameData frameoffset=3 value=0x0
smCom :DEBUG:Data[0]=0x0 len=35 Data[34]=0x50 Data[79]=0x23
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=22)
00 A4 04 00 10 A0 00 00 03 96 54 53 00 00 00 01
03 30 00 00 00 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb65bac len:22
smCom :DEBUG:I-Frame Data Len: 22 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 30 00 00 00 00 79 1C
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 30 00 00 00 00 79 1C
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
02
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 4 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=4)
6E 00 1A 49
smCom :DEBUG:RAW Rx< (Len=7)
A5 00 02 6E 00 1A 49
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x7
smCom :DEBUG:Received CRC:0x1a49 Calculated CRC:0x1a49
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x6e len=2 Data[1]=0x6e Data[0]=0x2
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=2)
6E 00
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
App :WARN :No SemsLite Applet Available.
hostLib:DEBUG:CloseSession command is sent only if valid Session exists!!!
smCom :DEBUG:TransceiveProcess nextTransceiveState 6
smCom :DEBUG:S-Frame PCB: c5
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C5 00 47 82
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C5 00 47 82
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E5
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
87 67
smCom :DEBUG:RAW Rx< (Len=5)
A5 E5 00 87 67
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x5
smCom :DEBUG:Received CRC:0x8767 Calculated CRC:0x8767
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:Close i2c device 3.

smCom :DEBUG:phNxpEse_close - ESE Context deinit completed
App :INFO :Running ./se05x_GetInfo
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
smCom :DEBUG:phPalEse_i2c_open_and_configure Opening port
smCom :DEBUG:I2CInit: opening /dev/i2c-2

smCom :DEBUG:I2C driver: PEC flag cleared

smCom :DEBUG:I2C driver supports plain i2c-level commands.

smCom :DEBUG:I2C driver Initialized :: fd = [12]
smCom :DEBUG:phNxpEseProto7816_Open: First open completed
smCom :DEBUG:phNxpEse_clearReadBuffer Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 260 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=260)
70 45 73 65 50 72 6F 74 6F 37 38 31 36 5F 4F 70
65 6E 3A 20 46 69 72 73 74 20 6F 70 65 6E 20 63
6F 6D 70 6C 65 74 65 64 00 59 B6 BE 00 00 00 00
A4 B8 04 00 14 5A B6 BE 88 58 B6 BE 00 00 00 00
9B E1 3C 49 00 00 00 00 FF FF FF FF 01 80 AD FB
00 59 B6 BE 00 59 B6 BE 00 59 B6 BE 00 59 B6 BE
24 59 B6 BE FE 59 B6 BE 00 59 B6 BE FE 59 B6 BE
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 05 00 00 00 00 00 00 00 49 03 3D 49
00 00 47 49 00 00 00 00 98 04 00 00 90 E1 05 00
C1 F9 3C 49 70 58 B6 BE FF FF FF FF 00 00 00 00
00 00 00 00 D8 58 B6 BE FF FF FF FF 10 00 FF B6
00 55 00 00 E8 58 B6 BE 75 2F 41 49 90 58 B6 BE
57 4C 3F 49 88 13 00 00 E8 03 00 00 40 42 0F 00
39 46 41 49 00 00 00 00 40 4B 4C 00 00 D0 05 00
22 5B B6 BE 00 00 00 00 FF E6 03 00 A4 58 B6 BE
05 00 00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:TransceiveProcess nextTransceiveState 4
smCom :DEBUG:S-Frame PCB: c0
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C0 00 FF FC
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C0 00 FF FC
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E0
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
3F 19
smCom :DEBUG:RAW Rx< (Len=5)
A5 E0 00 3F 19
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x5
smCom :DEBUG:Received CRC:0x3f19 Calculated CRC:0x3f19
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:TransceiveProcess nextTransceiveState 7
smCom :DEBUG:S-Frame PCB: c7
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C7 00 F7 B1
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E7
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
23
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 37 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=37)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F 2A 8D
smCom :DEBUG:RAW Rx< (Len=40)
A5 E7 23 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B
03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50
34 20 41 54 50 4F 2A 8D
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x28
smCom :DEBUG:Received CRC:0x2a8d Calculated CRC:0x2a8d
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeSFrameData frameoffset=3 value=0x0
smCom :DEBUG:Data[0]=0x0 len=35 Data[34]=0x50 Data[79]=0x23
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=22)
00 A4 04 00 10 A0 00 00 03 96 54 53 00 00 00 01
03 00 00 00 00 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb65418 len:22
smCom :DEBUG:I-Frame Data Len: 22 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
09
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 11 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=11)
03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:RAW Rx< (Len=14)
A5 00 09 03 06 00 61 D2 01 0B 90 00 50 AD
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0xe
smCom :DEBUG:Received CRC:0x50ad Calculated CRC:0x50ad
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x3 len=9 Data[8]=0x90 Data[0]=0x9
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=9)
03 06 00 61 D2 01 0B 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :INFO :Newer version of Applet Found
sss :INFO :Compiled for 0x30100. Got newer 0x30600
sss :WARN :Communication channel is Plain.
sss :WARN :!!!Not recommended for production use.!!!
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=11)
80 04 00 27 06 41 04 7F FF 02 06
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb64c7c len:11
smCom :DEBUG:I-Frame Data Len: 11 Seq. no:1
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=16)
5A 40 0B 80 04 00 27 06 41 04 7F FF 02 06 A1 C3
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=16)
5A 40 0B 80 04 00 27 06 41 04 7F FF 02 06 A1 C3
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 40
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
02
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 4 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=4)
69 85 00 C1
smCom :DEBUG:RAW Rx< (Len=7)
A5 40 02 69 85 00 C1
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x7
smCom :DEBUG:Received CRC:0xc1 Calculated CRC:0xc1
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x1
smCom :DEBUG:Data[0]=0x69 len=2 Data[1]=0x69 Data[133]=0x2
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=2)
69 85
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:6291 Function:sss_se05x_TXn
App :ERROR:Failed Se05x_API_CheckObjectExists
App :INFO :Error in Iot_Applet_Identify
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=5)
00 A4 04 00 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb65638 len:5
smCom :DEBUG:I-Frame Data Len: 5 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=10)
5A 00 05 00 A4 04 00 00 1E 3C
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=10)
5A 00 05 00 A4 04 00 00 1E 3C
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
14
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 22 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=22)
6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65
01 FF 90 00 95 F6
smCom :DEBUG:RAW Rx< (Len=25)
A5 00 14 6F 10 84 08 A0 00 00 01 51 00 00 00 A5
04 9F 65 01 FF 90 00 95 F6
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x19
smCom :DEBUG:Received CRC:0x95f6 Calculated CRC:0x95f6
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x6f len=20 Data[19]=0x90 Data[0]=0x14
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=20)
6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65
01 FF 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=8)
80 CA 00 FE 02 DF 28 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb65bb4 len:8
smCom :DEBUG:I-Frame Data Len: 8 Seq. no:1
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=13)
5A 40 08 80 CA 00 FE 02 DF 28 00 50 06
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=13)
5A 40 08 80 CA 00 FE 02 DF 28 00 50 06
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 40
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
49
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 75 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=75)
FE 45 DF 28 42 01 0C 00 01 A7 7E B8 DD 1E EE 56
49 10 76 02 08 00 00 00 00 00 00 00 01 03 18 4A
33 52 33 35 31 30 32 36 34 35 37 31 31 30 30 03
4D 67 74 0B E1 42 19 05 01 01 07 01 00 08 08 2E
5A D8 84 09 C9 BA DB 90 00 57 64
smCom :DEBUG:RAW Rx< (Len=78)
A5 40 49 FE 45 DF 28 42 01 0C 00 01 A7 7E B8 DD
1E EE 56 49 10 76 02 08 00 00 00 00 00 00 00 01
03 18 4A 33 52 33 35 31 30 32 36 34 35 37 31 31
30 30 03 4D 67 74 0B E1 42 19 05 01 01 07 01 00
08 08 2E 5A D8 84 09 C9 BA DB 90 00 57 64
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x4e
smCom :DEBUG:Received CRC:0x5764 Calculated CRC:0x5764
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x1
smCom :DEBUG:Data[0]=0xfe len=73 Data[72]=0x90 Data[0]=0x49
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=73)
FE 45 DF 28 42 01 0C 00 01 A7 7E B8 DD 1E EE 56
49 10 76 02 08 00 00 00 00 00 00 00 01 03 18 4A
33 52 33 35 31 30 32 36 34 35 37 31 31 30 30 03
4D 67 74 0B E1 42 19 05 01 01 07 01 00 08 08 2E
5A D8 84 09 C9 BA DB 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
App :WARN :#####################################################
App :INFO :Tag value - proprietary data 0xFE = 0xFE
App :INFO :Length of following data 0x45 = 0x45
App :INFO :Tag card identification data (Len=2)
DF 28
App :INFO :Length of card identification data = 0x42
App :INFO :Tag configuration ID (Must be 0x01) = 0x01
App :DEBUG:Length configuration ID 0x0C = 0x0C
App :INFO :Configuration ID (Len=12)
00 01 A7 7E B8 DD 1E EE 56 49 10 76
App :INFO :OEF ID (Len=2)
A7 7E
App :INFO :Tag patch ID (Must be 0x02) = 0x02
App :DEBUG:Length patch ID 0x08 = 0x08
App :INFO :Patch ID (Len=8)
00 00 00 00 00 00 00 01
App :INFO :Tag platform build ID1 (Must be 0x03) = 0x03
App :DEBUG:Length platform build ID 0x18 = 0x18
App :INFO :Platform build ID (Len=24)
4A 33 52 33 35 31 30 32 36 34 35 37 31 31 30 30
03 4D 67 74 0B E1 42 19
App :INFO :JCOP Platform ID = J3R3510264571100
App :INFO :Tag FIPS mode (Must be 0x05) = 0x05
App :DEBUG:Length FIPS mode 0x01 = 0x01
App :INFO :FIPS mode var = 0x01
App :INFO :Tag pre-perso state (Must be 0x07) = 0x07
App :DEBUG:Length pre-perso state 0x01 = 0x01
App :INFO :Bit mask of pre-perso state var = 0x00
App :INFO :Tag ROM ID (Must be 0x08) = 0x08
App :DEBUG:Length ROM ID 0x08 = 0x08
App :INFO :ROM ID (Len=8)
2E 5A D8 84 09 C9 BA DB
App :INFO :Status Word (SW) (Len=2)
90 00
App :INFO :se05x_GetInfoPlainApplet Example Success !!!...
smCom :DEBUG:Trying to Acquire Lock thread: -1224802288
smCom :DEBUG:LOCK Acquired by thread: -1224802288
smCom :DEBUG:APDU Tx> (Len=5)
80 CA 9F 7F 00
smCom :DEBUG:Enter phNxpEseProto7816_Transceive
smCom :DEBUG:Transceive data ptr 0x0xbeb65bc8 len:5
smCom :DEBUG:I-Frame Data Len: 5 Seq. no:0
smCom :DEBUG:TransceiveProcess nextTransceiveState 1
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=10)
5A 00 05 80 CA 9F 7F 00 3E 52
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=10)
5A 00 05 80 CA 9F 7F 00 3E 52
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0d
smCom :DEBUG:TX (axI2CRead): (Len=2)
00 00
smCom :DEBUG:_i2c_read() error : 13
smCom :DEBUG:_i2c_read() [HDR]errno : 79 ret : FFFFFFFF
smCom :DEBUG:phNxpEse_readPacket Normal Pkt, delay read 1ms
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 00
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
2F
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 49 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=49)
9F 7F 2A 47 90 D3 21 47 00 00 00 00 00 12 10 00
00 49 95 55 95 00 00 00 00 00 00 00 00 01 39 04
30 30 30 34 39 00 00 00 00 00 00 00 00 90 00 91
9F
smCom :DEBUG:RAW Rx< (Len=52)
A5 00 2F 9F 7F 2A 47 90 D3 21 47 00 00 00 00 00
12 10 00 00 49 95 55 95 00 00 00 00 00 00 00 00
01 39 04 30 30 30 34 39 00 00 00 00 00 00 00 00
90 00 91 9F
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x34
smCom :DEBUG:Received CRC:0x919f Calculated CRC:0x919f
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame Received
smCom :DEBUG:phNxpEseProto7816_DecodeFrame I-Frame lastRcvdIframeInfo.seqNo:0x0
smCom :DEBUG:Data[0]=0x9f len=47 Data[46]=0x90 Data[0]=0x2f
smCom :DEBUG: phNxpEse_Transceive Exit status 0x0
smCom :DEBUG:APDU Rx< (Len=47)
9F 7F 2A 47 90 D3 21 47 00 00 00 00 00 12 10 00
00 49 95 55 95 00 00 00 00 00 00 00 00 01 39 04
30 30 30 34 39 00 00 00 00 00 00 00 00 90 00
smCom :DEBUG:Trying to Released Lock by thread: -1224802288
smCom :DEBUG:LOCK Released by thread: -1224802288
App :WARN :#####################################################
App :INFO :cplc_data.IC_fabricator (Len=2)
47 90
App :INFO :cplc_data.IC_type1 (Len=2)
D3 21
App :INFO :cplc_data.Operating_system_identifier (Len=2)
47 00
App :INFO :cplc_data.Operating_system_release_date (Len=2)
00 00
App :INFO :cplc_data.Operating_system_release_level (Len=2)
00 00
App :INFO :cplc_data.IC_fabrication_date (Len=2)
12 10
App :INFO :cplc_data.IC_Serial_number (Len=4)
00 00 49 95
App :INFO :cplc_data.IC_Batch_identifier (Len=2)
55 95
App :INFO :cplc_data.IC_module_fabricator (Len=2)
00 00
App :INFO :cplc_data.IC_module_packaging_date (Len=2)
00 00
App :INFO :cplc_data.ICC_manufacturer (Len=2)
00 00
App :INFO :cplc_data.IC_embedding_date (Len=2)
00 00
App :INFO :cplc_data.IC_OS_initializer (Len=2)
01 39
App :INFO :cplc_data.IC_OS_initialization_date (Len=2)
04 30
App :INFO :cplc_data.IC_OS_initialization_equipment (Len=4)
30 30 34 39
App :INFO :cplc_data.IC_personalizer (Len=2)
00 00
App :INFO :cplc_data.IC_personalization_date (Len=2)
00 00
App :INFO :cplc_data.IC_personalization_equipment_ID (Len=4)
00 00 00 00
App :INFO :cplc_data.SW (Len=2)
90 00
App :INFO :ex_sss Finished
hostLib:DEBUG:CloseSession command is sent only if valid Session exists!!!
smCom :DEBUG:TransceiveProcess nextTransceiveState 6
smCom :DEBUG:S-Frame PCB: c5
smCom :DEBUG:phNxpEse_WriteFrame Enter ..
smCom :DEBUG:TX (axI2CWrite) > (Len=5)
5A C5 00 47 82
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:RAW Tx> (Len=5)
5A C5 00 47 82
smCom :DEBUG:phNxpEse_read Enter ..
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
A5 E5
smCom :DEBUG:phNxpEse_readPacket Read HDR
smCom :DEBUG:phNxpEse_readPacket SOF FOUND
smCom :DEBUG:phPalEse_i2c_read Read Requested 1 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=1)
00
smCom :DEBUG:poll_sof_chained_delay value is 0
smCom :DEBUG:phPalEse_i2c_read Read Requested 2 bytes
smCom :DEBUG:Done with rv = 0c
smCom :DEBUG:TX (axI2CRead): (Len=2)
87 67
smCom :DEBUG:RAW Rx< (Len=5)
A5 E5 00 87 67
smCom :DEBUG:phNxpEseProto7816_ProcessResponse p_data ----> 0x61c88 len ----> 0x5
smCom :DEBUG:Received CRC:0x8767 Calculated CRC:0x8767
smCom :DEBUG:Retry Counter = 0
smCom :DEBUG:phNxpEseProto7816_DecodeFrame S-Frame Received
smCom :DEBUG:Close i2c device 3.

smCom :DEBUG:phNxpEse_close - ESE Context deinit completed

 

Thanks.

0 Kudos
7,603 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Thanks for the information! Looks like you are using platform SCP03 authentication instead of AESKey, so I changed my configuration as yours.

Kan_Li_0-1639548914992.png

and use external file containing the platform SCP03 keys.

Kan_Li_1-1639549054130.png

The authentication passed successfully with the following keys.

ENC 35C256458958A34F6136155F8209D6CD # Trailing comment
MAC AF177D5DBDF7C0D5C10A05B9F1607F78 # Optional trailing comment
DEK A1BC8438BF77935B361A4425FE79FA29 # Optional trailing comment

 

but if I use a different MAC key , for example, 

MAC AF177D5DBDF7C0D5C10A05B9F1607F72

 

The authentication failed as similar as you met.

App :INFO :PlugAndTrust_v04.00.00_20211026
App :INFO :Running C:\se050_middleware\simw-top_build\se_x86\bin\Debug\se05x_Minimal.exe
App :INFO :Using PortName='\\.\COM7' (gszCOMPortDefault)
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
App :DEBUG:Using File: C:\nxp\SE05X\plain_scp.txt
App :WARN :Using SCP03 keys from:'C:\nxp\SE05X\plain_scp.txt' (FILE=C:\nxp\SE05X\plain_scp.txt)
Opening COM Port '\\.\COM7'
smCom :DEBUG:Get ATR (Len=4)
00 00 00 00
smCom :DEBUG:pAtr (Len=39)
00 00 00 23 00 A0 00 00 03 96 04 03 E8 00 FE 02
0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F
50 34 20 41 54 50 4F
smCom :DEBUG:no lock mode
smCom :DEBUG:H> (Len=4)
01 00 00 16
smCom :DEBUG:Tx> (Len=22)
00 A4 04 00 10 A0 00 00 03 96 54 53 00 00 00 01
03 00 00 00 00 00
smCom :DEBUG:<H (Len=4)
01 00 00 09
smCom :DEBUG:<Rx (Len=9)
03 01 00 6F FF 01 0B 90 00
smCom :DEBUG:no lock mode
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
scp :DEBUG:FN: nxScp03_AuthenticateChannel
scp :DEBUG: Output: hostChallenge (Len=8)
A7 49 D3 93 CF BC AF 06
scp :DEBUG:FN: nxScp03_GP_InitializeUpdate
scp :DEBUG:Input:keyVersion 0b
scp :DEBUG: Input: hostChallenge (Len=8)
A7 49 D3 93 CF BC AF 06
scp :DEBUG:Sending GP Initialize Update Command !!!
smCom :DEBUG:no lock mode
smCom :DEBUG:H> (Len=4)
01 00 00 0D
smCom :DEBUG:Tx> (Len=13)
80 50 0B 00 08 A7 49 D3 93 CF BC AF 06
smCom :DEBUG:<H (Len=4)
01 00 00 1F
smCom :DEBUG:<Rx (Len=31)
90 03 92 84 05 21 70 99 37 34 0B 03 00 14 60 E2
8D 0F 2B 79 61 A0 64 98 04 F1 45 B9 DB 90 00
smCom :DEBUG:no lock mode
scp :DEBUG: Output: keyDivData (Len=10)
90 03 92 84 05 21 70 99 37 34
scp :DEBUG: Output: keyInfo (Len=3)
0B 03 00
scp :DEBUG: Output: cardChallenge (Len=8)
14 60 E2 8D 0F 2B 79 61
scp :DEBUG: Output: cardCryptoGram (Len=8)
A0 64 98 04 F1 45 B9 DB
scp :DEBUG:FN: nxScp03_HostLocal_CalculateSessionKeys
scp :DEBUG: Input:hostChallenge (Len=8)
A7 49 D3 93 CF BC AF 06
scp :DEBUG: Input:cardChallenge (Len=8)
14 60 E2 8D 0F 2B 79 61
scp :DEBUG:Set the Derviation data to generate Session ENC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 04
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 04 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG: Output:outSignature (Len=16)
90 67 9A C3 53 D3 A8 75 47 0C 21 93 56 1D F8 F6
scp :DEBUG: Output:sessionEncKey (Len=16)
90 67 9A C3 53 D3 A8 75 47 0C 21 93 56 1D F8 F6
scp :DEBUG:Set the Derviation data to generate Session MAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 06
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 06 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG: Output:outSignature (Len=16)
47 04 12 93 3C 60 66 24 3E 7A BD C5 40 C8 18 BD
scp :DEBUG: Output:sessionMacKey (Len=16)
47 04 12 93 3C 60 66 24 3E 7A BD C5 40 C8 18 BD
scp :DEBUG:Set the Derviation data to generate Session RMAC key
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 07
scp :DEBUG:Input:ddL 80
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG: Output:outSignature (Len=16)
BA 99 0C 07 4E 1B 98 FD 5A 16 4B FC EB 1A F2 04
scp :DEBUG: Output:sessionRmacKey (Len=16)
BA 99 0C 07 4E 1B 98 FD 5A 16 4B FC EB 1A F2 04
scp :DEBUG:FN: nxScp03_HostLocal_VerifyCardCryptogram
scp :DEBUG: Input:hostChallenge (Len=8)
A7 49 D3 93 CF BC AF 06
scp :DEBUG: Input:cardChallenge (Len=8)
14 60 E2 8D 0F 2B 79 61
scp :DEBUG:FN: nxScp03_setDerivationData
scp :DEBUG:Input:ddConstant 00
scp :DEBUG:Input:ddL 40
scp :DEBUG:Input:iCounter 01
scp :DEBUG: Input: keyInfo (Len=16)
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:Output: KeyDivData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG:FN: nxScp03_Generate_SessionKey
scp :DEBUG: Input: inData (Len=32)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 01
A7 49 D3 93 CF BC AF 06 14 60 E2 8D 0F 2B 79 61
scp :DEBUG: Output:outSignature (Len=16)
E3 13 D6 B5 7C D6 EA 47 DB C2 58 69 BC F7 1F F7
scp :DEBUG: Output:cardCryptogram (Len=16)
E3 13 D6 B5 7C D6 EA 47 DB C2 58 69 BC F7 1F F7
scp :WARN :nxEnsure:'status == kStatus_SSS_Success' failed. At Line:144 Function:nxScp03_AuthenticateChannel
sss :ERROR:Could not set SCP03 Secure Channel
App :ERROR:sss_session_open failed
App :ERROR:ex_sss_session_open Failed
App :ERROR:!ERROR! ret != 0.

C:\se050_middleware\simw-top_build\se_x86\bin\Debug\se05x_Minimal.exe (process 5656) exited with code 1.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

 

Please kindly check the keys setting from your side, both the embedded Linux host and the SE050 dev kits. You may run the demo of "Delete and Test Provision" as I mentioned before to inject the default the authentication objects into the dev kits.

 

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
7,593 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

This keys you have provided me are the ones the I am using during the whole process. I ran this the demo of "Delete and Test Provision" and it didn't work, it stopped in the same place.

Attached to this message are a document that I relate all my environment and test I did with "Get Info", also is attached the "cmake_option.txt" file for more information.

 

Thanks.

0 Kudos
7,586 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Thanks for the information! I checked the cmake option from your side, almost the same, except the host.

 

I am wondering with which configuration you run the demo of "Delete and Test Provision"? 

-DSCP=SCP03_SSS
-DSE05X_Auth=PlatfSCP03

 

Or

-DSCP=None
-DSE05X_Auth=None

 

As you mentioned before, the GetInfo demo can run well without SCP03 Authentication, so I think it should be the same the demo of "Delete and Test Provision", right? Please kindly clarify.

 

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
7,576 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

Thank you for checking my cmake options.

For "Delete and Test Provision" I'm using:

-DSCP=SCP03_SSS
-DSE05X_Auth=PlatfSCP03

I have shown in the document I have sent you the behavior with SCP03 authentication and without SCP03 auth. For you to help me to see if there is anything strange in the behaviour without SCP03 authentication.

 

I have one more question @Kan_Li, I noticed that your MW version is different than mine. I'm wondering if I can get an older and a newer version to compile and test here.

My devkit HW are working well and I have 2 of them with my team and those 2 are operating in the same way.

I got this info and I ask you to clarify for me:

sss   :INFO :atr (Len=35)

      00 A0 00 00    03 96 04 03    E8 00 FE 02    0B 03 E8 08

      01 00 00 00    00 64 00 00    0A 4A 43 4F    50 34 20 41

      54 50 4F

sss   :INFO :Newer version of Applet Found

sss   :INFO :Compiled for 0x30100. Got newer 0x30600

 

Thanks.

0 Kudos
7,565 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Thanks for the information! I have just checked with the expert, from the ATR info, looks like SE050F2 is on your board, and it uses different SCP03 keys as the default ones on the dev kits.

Kan_Li_0-1639664302567.png

Please use the above keys instead and check if they make any difference. Please refer to https://www.nxp.com/docs/en/application-note/AN12436.pdf for more details.

 

You may also switch on FIPS option to make the MW built for the SE050F IoT Applet which is version 3.6.

Kan_Li_1-1639665477589.png

 

of course it is not the root cause, but makes sense. It just slightly modifies the behavior of some examples.

 

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
7,557 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

Thank you for the reply, it was successful. It worked and I ran the Get Info, Minimal and Delete and Test Provision applications with no more issues.

Now, I will continue the work to bind the library to the OpenSSL Engine.

 

Thank you a lot.

0 Kudos
7,538 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Great to know! Thanks for the update! 

 

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
7,480 Views
ElielderBMelo
Contributor I

Hi @Kan_Li 

I'm having issues with OpenSSL, but first I ask you, please, to check my log files to see if it is correct to the expected from "Get Info" and "Delete and Test Provision" applications.

If they are correct, I will open one more question on the forum for you to provide me help in this issue.

 

Thanks.

Best Regards.

0 Kudos
7,434 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

I have reviewed the logs, and they are correct. I think you have enabled PlatSCP03 authentication correctly.

 

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
7,675 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

Thanks for the info! Did you inject these keys with the demo of SE05X Rotate PlatformSCP Keys Demo? Or the dev kit still holds the default keys? Please kindly clarify.

 

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
7,653 Views
ElielderBMelo
Contributor I

No, I didn't use the SE05X Rotate PlatformSCP Keys Demo. The kit holds the default keys.

I'm trying to authenticate with SCP03 keys, only. And I've created a file which stores the ENC, MAC and DEK keys, this file are being called by EX_SSS_SCP03_FILE_PATH.

Thanks.

0 Kudos
7,698 Views
ElielderBMelo
Contributor I

I've found a info:

sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :INFO :Newer version of Applet Found
sss :INFO :Compiled for 0x30100. Got newer 0x30600

Is there any problem with this?

0 Kudos
7,673 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @ElielderBMelo ,

 

What is the version of MW on your hands? I guess it should be 3.03.00, right?

 

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
7,652 Views
ElielderBMelo
Contributor I

Yes, it is the latest version of Middleware, 03.03.00.

 

0 Kudos