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.