11.12.3.4.77. Function Se05x_API_DFDumpSessionKeys

11.12.3.4.77.1. Function Documentation

smStatus_t Se05x_API_DFDumpSessionKeys(pSe05xSession_t session_ctx, uint8_t *sessionData, size_t *psessionDataLen)

Se05x_API_DFAuthenticateNonFirstPart2

For NonFirst part 2, the key identifier is implicitly set to the identifier used for the NonFirst part 1 authentication. DFAuthenticateNonFirstPart1 needs to be called before; otherwise an error is returned.

If authentication fails, SW_WRONG_DATA will be returned.

Command to Applet

Field

Value

Description

CLA

0x80

INS

INS_CRYPTO

SE05x_INS_t

P1

P1_DEFAULT

See SE05x_P1_t

P2

P2_AUTH_NONFIRST_PART2

See SE05x_P2_t

Lc

#(Payload)

TLV[TAG_1]

16-byte E(Kx, RndA’)

Le

0x00

R-APDU Body

NA

R-APDU Trailer

SW

Description

SW_NO_ERROR

The command is handled successfully.

@param[in] session_ctx Session Context [0:kSE05x_pSession] @param[in] inputData inputData [1:kSE05x_TAG_1] @param[in] inputDataLen Length of inputData

/

smStatus_t Se05x_API_DFAuthenticateNonFirstPart2(

pSe05xSession_t session_ctx, const uint8_t inputData, size_t inputDataLen);

/ * Se05x_API_DFDumpSessionKeys

Dump the Transaction Identifier and the session keys to the host.

# Command to Applet

verbatim embed:rst:leading-asterisk +——-+————-+———————————–+ | Field | Value | Description | +=======+=============+===================================+ | CLA | 0x80 | | +——-+————-+———————————–+ | INS | INS_CRYPTO | SE05x_INS_t | +——-+————-+———————————–+ | P1 | P1_DEFAULT | See SE05x_P1_t | +——-+————-+———————————–+ | P2 | P2_DUMP_KEY | See SE05x_P2_t | +——-+————-+———————————–+ | Lc | #(Payload) | | +——-+————-+———————————–+ | Le | 0x28 | Expecting TLV with 38 bytes data. | +——-+————-+———————————–+

R-APDU Body

Value

Description

TLV[TAG_1]

38 bytes: KeyID.SesAuthENCKey || KeyID.SesAuthMACKey || TI || Cmd-Ctr

R-APDU Trailer

SW

Description

SW_NO_ERROR

The command is handled successfully.

Parameters
  • [in] session_ctx: Session Context [0:kSE05x_pSession]

  • [out] sessionData: 38 bytes: KeyID.SesAuthENCKey || KeyID.SesAuthMACKey || TI || Cmd-Ctr [0:kSE05x_TAG_1]

  • [inout] psessionDataLen: Length for sessionData