BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_Desfire_ChangeExtKey | ( | brp_protocol | protocol, |
brp_Desfire_ChangeExtKey_MasterKeyType | MasterKeyType, | ||
bool | IsKeySet, | ||
bool | IsAesKey, | ||
bool | IsVersion, | ||
bool | IsChangeKey, | ||
unsigned | KeyNo, | ||
unsigned | KeyVersion, | ||
brp_buf | NewKey, | ||
size_t | NewKey_len, | ||
brp_buf | OldKey, | ||
size_t | OldKey_len, | ||
unsigned | KeySet | ||
) |
This command allows to change any key stored on the card.
The key length has to be set according to the desired encryption algorithm:
[in] | protocol | used to execute the command |
[in] | MasterKeyType | These bits must only be set if the card's Master Key is changed. They specify the type of the new card's Master Key. |
[in] | IsKeySet | Only needed for Desfire EV2 with multiple Keysets. If true ,the reader executes the Desfire "ChangeKeyEV2" command instead of the Desfire "ChangeKey" command. |
[in] | IsAesKey | Has to be set if the new key is an AES key. |
[in] | IsVersion | Has to be set if the NewKeyVersion parameter is present. |
[in] | IsChangeKey | Has to be set if the key used to authenticate the card is the key that needs to be changed (as specified in KeyNo). In this case, the parameter OldKey has to be omitted. |
[in] | KeyNo | Number of key (0-13) to modify. Has to be 0 if the application Master Key is changed. |
[in] | KeyVersion | Version of the new key. Remarks: * If this value is not available (i.e. if IsVersion is not set), 0 will be assumed as NewKeyVersion. |
[in] | NewKey | New key (16 bytes). |
[in] | NewKey_len | |
[in] | OldKey | Current key (16 bytes). |
[in] | OldKey_len | |
[in] | KeySet | specifies KeySet needed for multiple keysets (EV2 extension). |