11.12.3.4.76. Function Se05x_API_DFDiversifyKey¶
Defined in File se05x_APDU_apis.h
11.12.3.4.76.1. Function Documentation¶
-
smStatus_t
Se05x_API_DFDiversifyKey
(pSe05xSession_t session_ctx, uint32_t masterKeyID, uint32_t diversifiedKeyID, const uint8_t *divInputData, size_t divInputDataLen)¶ Se05x_API_DFDiversifyKey
Create a Diversified Key. Input is divInput 1 up to 31 bytes.
Note that users need to create the diversified key object before calling this function.
Both the master key and the diversified key need the policy POLICY_OBJ_ALLOW_DESFIRE_AUTHENTICATION to be set.
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_CRYPTO
P1
P1_DEFAULT
See
SE05x_P1_t
P2
P2_DIVERSIFY
See
SE05x_P2_t
Lc
#(Payload)
TLV[TAG_1]
4-byte master key identifier.
TLV[TAG_2]
4-byte diversified key identifier.
TLV[TAG_3]
Byte array containing divInput (up to 31 bytes).
Le
R-APDU Body
NA
R-APDU Trailer
SW
Description
SW_NO_ERROR
The command is handled successfully.
SW_CONDITIONS_NOT_SATISFIED
No master key found.
Wrong length for divInput.
- Parameters
[in] session_ctx
: Session Context [0:kSE05x_pSession][in] masterKeyID
: masterKeyID [1:kSE05x_TAG_1][in] diversifiedKeyID
: diversifiedKeyID [2:kSE05x_TAG_2][in] divInputData
: divInputData [3:kSE05x_TAG_3][in] divInputDataLen
: Length of divInputData