uFCoder 2.62
|
Functions specific to Mifare DESFire® Light cards. More...
Functions | |
UFR_STATUS DL_API | desfire_check_clear_record_transaction_mac (uint8_t file_no, uint32_t trans_mac_counter, IN uint8_t *uid, IN uint8_t *trans_mac_key, IN uint8_t *reader_id, IN uint8_t *prev_enc_reader_id, IN uint8_t *trans_mac_value, OUT uint8_t *prev_reader_id) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in clear record operation. Function also returns decrypted Previous Reader ID. Users must enter file number, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC. | |
UFR_STATUS DL_API | desfire_check_write_record_transaction_mac (uint8_t file_no, uint32_t offset, uint32_t data_len, IN uint8_t *data, uint32_t trans_mac_counter, IN uint8_t *uid, IN uint8_t *trans_mac_key, IN uint8_t *reader_id, IN uint8_t *prev_enc_reader_id, IN uint8_t *trans_mac_value, OUT uint8_t *prev_reader_id) |
UFR_STATUS DL_API | dfl_change_file_settings (uint8_t aes_key_no, uint8_t file_no, uint8_t key_no, uint8_t curr_communication_mode, uint8_t new_communication_mode, uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function changes file settings. | |
UFR_STATUS DL_API | dfl_change_file_settings_pk (IN uint8_t *aes_key_ext, uint8_t file_no, uint8_t key_no, uint8_t curr_communication_mode, uint8_t new_communication_mode, uint8_t read_key_no, uint8_t write_key_no, uint8_t read_write_key_no, uint8_t change_key_no) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function changes file settings. | |
UFR_STATUS DL_API | dfl_change_tmc_file_settings (uint8_t aes_key_no, uint8_t file_no, uint8_t key_no, uint8_t curr_communication_mode, uint8_t new_communication_mode, uint8_t read_key_no, uint8_t commit_reader_id_key_no, uint8_t change_key_no, uint8_t ex_unauth_operation, uint8_t tmc_limit_conf, uint32_t tmc_limit) |
Function changes file settings of the Transaction MAC file. | |
UFR_STATUS DL_API | dfl_check_credit_value_transaction_mac (uint8_t file_no, uint32_t value, uint32_t trans_mac_counter, IN uint8_t *uid, IN uint8_t *trans_mac_key, IN uint8_t *reader_id, IN uint8_t *prev_enc_reader_id, IN uint8_t *trans_mac_value, OUT uint8_t *prev_reader_id) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in credit value operation. Function also returns decrypted Previous Reader ID. User must enter file number, value of credit, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC. | |
UFR_STATUS DL_API | dfl_check_debit_value_transaction_mac (uint8_t file_no, uint32_t value, uint32_t trans_mac_counter, IN uint8_t *uid, IN uint8_t *trans_mac_key, IN uint8_t *reader_id, IN uint8_t *prev_enc_reader_id, IN uint8_t *trans_mac_value, OUT uint8_t *prev_reader_id) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in debit value operation. Function also returns decrypted Previous Reader ID. User must enter file number, value of credit, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC. | |
UFR_STATUS DL_API | dfl_check_write_record_transaction_mac (uint8_t file_no, uint32_t offset, uint32_t data_len, IN uint8_t *data, uint32_t trans_mac_counter, IN uint8_t *uid, IN uint8_t *trans_mac_key, IN uint8_t *reader_id, IN uint8_t *prev_enc_reader_id, IN uint8_t *trans_mac_value, OUT uint8_t *prev_reader_id) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in write record operation. Function also returns decrypted Previous Reader ID. User must enter file number, data offset, data length, array of data, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC. | |
UFR_STATUS DL_API | dfl_delete_tmc_file (uint8_t aes_key_no, uint8_t file_no) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function delete transaction MAC file. NOTE: Transaction MAC file exist by factory default. To use the operations with value file, and cyclic record file, this file must be deleted. From library version 5.0.37 and firmware version 5.0.38, Transaction MAC operation supported for Desfire Light and Desfire EV2. To use these features, an Transaction MAC file must exist in the selected application. | |
UFR_STATUS DL_API | dfl_delete_tmc_file_pk (IN uint8_t *aes_key_ext, uint8_t file_no) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function delete transaction MAC file. NOTE: Transaction MAC file exist by factory default. To use the operations with value file, and cyclic record file, this file must be deleted. From library version 5.0.37 and firmware version 5.0.38, Transaction MAC operation supported for Desfire Light and Desfire EV2. To use these features, an Transaction MAC file must exist in the selected application. | |
UFR_STATUS DL_API | dfl_get_file_settings (uint8_t file_no, VAR uint8_t *file_type, VAR uint8_t *communication_mode, VAR uint8_t *read_key_no, VAR uint8_t *write_key_no, VAR uint8_t *read_write_key_no, VAR uint8_t *change_key_no, VAR uint32_t *file_size, VAR int32_t *lower_limit, VAR int32_t *upper_limit, VAR uint32_t *limited_credit_value, VAR uint8_t *limited_credit_enable, VAR uint8_t *free_get_value, VAR uint32_t *record_size, VAR uint32_t *max_number_of_rec, VAR uint32_t *curr_number_of_rec, VAR uint8_t *ex_unauth_operation, VAR uint8_t *tmc_limit_conf, VAR uint8_t *tm_key_type, VAR uint8_t *tm_key_version, VAR uint32_t *tmc_limit) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. | |
Functions specific to Mifare DESFire® Light cards.
UFR_STATUS DL_API desfire_check_clear_record_transaction_mac | ( | uint8_t | file_no, |
uint32_t | trans_mac_counter, | ||
IN uint8_t * | uid, | ||
IN uint8_t * | trans_mac_key, | ||
IN uint8_t * | reader_id, | ||
IN uint8_t * | prev_enc_reader_id, | ||
IN uint8_t * | trans_mac_value, | ||
OUT uint8_t * | prev_reader_id ) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in clear record operation. Function also returns decrypted Previous Reader ID. Users must enter file number, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC.
file_no | file number |
trans_mac_counter | transaction MAC counter |
uid | pointer to 7 bytes array containing card UID |
trans_mac_key | pointer to 16 bytes array containing Transaction MAC key |
reader_id | pointer to 16 bytes array containing Reader ID |
prev_enc_reader_id | pointer to 16 bytes array containing Previous Encrypted Reader ID |
trans_mac_value | pointer to 8 bytes array containing Transaction MAC |
prev_reader_id | pointer to 16 bytes array containing Previous Reader ID |
UFR_STATUS DL_API desfire_check_write_record_transaction_mac | ( | uint8_t | file_no, |
uint32_t | offset, | ||
uint32_t | data_len, | ||
IN uint8_t * | data, | ||
uint32_t | trans_mac_counter, | ||
IN uint8_t * | uid, | ||
IN uint8_t * | trans_mac_key, | ||
IN uint8_t * | reader_id, | ||
IN uint8_t * | prev_enc_reader_id, | ||
IN uint8_t * | trans_mac_value, | ||
OUT uint8_t * | prev_reader_id ) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in write record operation. Function also returns decrypted Previous Reader ID. User must enter file number, data offset, data length, array of data, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC.
file_no | file number |
offset | data offset |
data_len | length of array of data |
data | pointer to data array |
trans_mac_counter | transaction MAC counter |
uid | pointer to 7 bytes array containing card UID |
trans_mac_key | pointer to 16 bytes array containing Transaction MAC key |
reader_id | pointer to 16 bytes array containing Reader ID |
prev_enc_reader_id | pointer to 16 bytes array containing Previous Encrypted Reader ID |
trans_mac_value | pointer to 8 bytes array containing Transaction MAC |
prev_reader_id | pointer to 16 bytes array containing Previous Reader ID |
UFR_STATUS DL_API dfl_change_file_settings | ( | uint8_t | aes_key_no, |
uint8_t | file_no, | ||
uint8_t | key_no, | ||
uint8_t | curr_communication_mode, | ||
uint8_t | new_communication_mode, | ||
uint8_t | read_key_no, | ||
uint8_t | write_key_no, | ||
uint8_t | read_write_key_no, | ||
uint8_t | change_key_no ) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function changes file settings.
aes_key_no | reader key number of AES key (0 - 15) |
file_no | file number 0, 1, 3, 4, 15 or 31 |
key_no | currnent change key no |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain, 1 - MACed, 3 - enciphered |
read_key_no | read key number (0 - 4) |
write_key_no | write key number (0 - 4) |
read_write_key_no | read write key number (0 - 4) |
change_key_no | change key number (0 - 4) |
UFR_STATUS DL_API dfl_change_file_settings_pk | ( | IN uint8_t * | aes_key_ext, |
uint8_t | file_no, | ||
uint8_t | key_no, | ||
uint8_t | curr_communication_mode, | ||
uint8_t | new_communication_mode, | ||
uint8_t | read_key_no, | ||
uint8_t | write_key_no, | ||
uint8_t | read_write_key_no, | ||
uint8_t | change_key_no ) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function changes file settings.
aes_key_ext | pointer to array contained AES key aes_key_no reader key number of AES key (0 - 15) |
file_no | file number 0, 1, 3, 4, 15 or 31 curr_communication_mode current communication mode 0 - plain, 1 - MACed, 3 - enciphered new_communication_mode new communication mode 0 - plain, 1 - MACed, 3 - enciphered read_key_no read key number (0 - 4) write_key_no write key number (0 - 4) read_write_key_no read write key number (0 - 4) change_key_no change key number (0 - 4) |
key_no | DESCRIPTION |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain, 1 - MACed, 3 - enciphered |
read_key_no | read key number (0 - 4) |
write_key_no | write key number (0 - 4) |
read_write_key_no | read write key number (0 - 4) |
change_key_no | change key number (0 - 4) |
UFR_STATUS DL_API dfl_change_tmc_file_settings | ( | uint8_t | aes_key_no, |
uint8_t | file_no, | ||
uint8_t | key_no, | ||
uint8_t | curr_communication_mode, | ||
uint8_t | new_communication_mode, | ||
uint8_t | read_key_no, | ||
uint8_t | commit_reader_id_key_no, | ||
uint8_t | change_key_no, | ||
uint8_t | ex_unauth_operation, | ||
uint8_t | tmc_limit_conf, | ||
uint32_t | tmc_limit ) |
Function changes file settings of the Transaction MAC file.
aes_key_no | aes_key_no |
file_no | file_no |
key_no | key_no |
curr_communication_mode | curr_communication_mode |
new_communication_mode | new_communication_mode |
read_key_no | read_key_no |
commit_reader_id_key_no | commit_reader_id_key_no |
change_key_no | change_key_no |
ex_unauth_operation | ex_unauth_operation |
tmc_limit_conf | tmc_limit_conf |
tmc_limit | tmc_limit |
UFR_STATUS DL_API dfl_check_credit_value_transaction_mac | ( | uint8_t | file_no, |
uint32_t | value, | ||
uint32_t | trans_mac_counter, | ||
IN uint8_t * | uid, | ||
IN uint8_t * | trans_mac_key, | ||
IN uint8_t * | reader_id, | ||
IN uint8_t * | prev_enc_reader_id, | ||
IN uint8_t * | trans_mac_value, | ||
OUT uint8_t * | prev_reader_id ) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in credit value operation. Function also returns decrypted Previous Reader ID. User must enter file number, value of credit, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC.
file_no | file number |
value | value of credit |
trans_mac_counter | transaction MAC counter uid pointer to 7 bytes array containing card UID trans_mac_key pointer to 16 bytes array containing Transaction MAC key reader_id pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
uid | pointer to 7 bytes array containing card UID trans_mac_key pointer to 16 bytes array containing Transaction MAC key reader_id pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
trans_mac_key | pointer to 16 bytes array containing Transaction MAC key |
reader_id | pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
prev_enc_reader_id | pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
trans_mac_value | pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
prev_reader_id | pointer to 16 bytes array containing Previous Reader ID |
UFR_STATUS DL_API dfl_check_debit_value_transaction_mac | ( | uint8_t | file_no, |
uint32_t | value, | ||
uint32_t | trans_mac_counter, | ||
IN uint8_t * | uid, | ||
IN uint8_t * | trans_mac_key, | ||
IN uint8_t * | reader_id, | ||
IN uint8_t * | prev_enc_reader_id, | ||
IN uint8_t * | trans_mac_value, | ||
OUT uint8_t * | prev_reader_id ) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in debit value operation. Function also returns decrypted Previous Reader ID. User must enter file number, value of credit, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC.
file_no | file number |
value | value of debit |
trans_mac_counter | transaction MAC counter uid pointer to 7 bytes array containing card UID trans_mac_key pointer to 16 bytes array containing Transaction MAC key reader_id pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
uid | pointer to 7 bytes array containing card UID trans_mac_key pointer to 16 bytes array containing Transaction MAC key reader_id pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
trans_mac_key | pointer to 16 bytes array containing Transaction MAC key |
reader_id | pointer to 16 bytes array containing Reader ID prev_enc_reader_id pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
prev_enc_reader_id | pointer to 16 bytes array containing Previous Encrypted Reader ID trans_mac_value pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
trans_mac_value | pointer to 8 bytes array containing Transaction MAC prev_reader_id pointer to 16 bytes array containing Previous Reader ID |
prev_reader_id | pointer to 16 bytes array containing Previous Reader ID |
UFR_STATUS DL_API dfl_check_write_record_transaction_mac | ( | uint8_t | file_no, |
uint32_t | offset, | ||
uint32_t | data_len, | ||
IN uint8_t * | data, | ||
uint32_t | trans_mac_counter, | ||
IN uint8_t * | uid, | ||
IN uint8_t * | trans_mac_key, | ||
IN uint8_t * | reader_id, | ||
IN uint8_t * | prev_enc_reader_id, | ||
IN uint8_t * | trans_mac_value, | ||
OUT uint8_t * | prev_reader_id ) |
From library version 5.0.37 and firmware version 5.0.38. For Desfire Light, and Desfire EV2. Helper function for check transaction MAC in write record operation. Function also returns decrypted Previous Reader ID. User must enter file number, data offset, data length, array of data, transaction MAC counter, card UID, transaction MAC key, Reader ID, encrypted Previous Reader ID and transaction MAC.
file_no | file number |
offset | data offset |
data_len | length of array of data |
data | pointer to data array |
trans_mac_counter | transaction MAC counter |
uid | pointer to 7 bytes array containing card UID |
trans_mac_key | pointer to 16 bytes array containing Transaction MAC key |
reader_id | pointer to 16 bytes array containing Reader ID |
prev_enc_reader_id | pointer to 16 bytes array containing Previous Encrypted Reader ID |
trans_mac_value | pointer to 8 bytes array containing Transaction MAC |
prev_reader_id | pointer to 16 bytes array containing Previous Reader ID |
UFR_STATUS DL_API dfl_delete_tmc_file | ( | uint8_t | aes_key_no, |
uint8_t | file_no ) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function delete transaction MAC file. NOTE: Transaction MAC file exist by factory default. To use the operations with value file, and cyclic record file, this file must be deleted. From library version 5.0.37 and firmware version 5.0.38, Transaction MAC operation supported for Desfire Light and Desfire EV2. To use these features, an Transaction MAC file must exist in the selected application.
aes_key_no | reader key number of AES key (0 - 15) |
file_no | file number |
UFR_STATUS DL_API dfl_delete_tmc_file_pk | ( | IN uint8_t * | aes_key_ext, |
uint8_t | file_no ) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command. Function delete transaction MAC file. NOTE: Transaction MAC file exist by factory default. To use the operations with value file, and cyclic record file, this file must be deleted. From library version 5.0.37 and firmware version 5.0.38, Transaction MAC operation supported for Desfire Light and Desfire EV2. To use these features, an Transaction MAC file must exist in the selected application.
aes_key_ext | pointer to array contained AES key aes_key_no reader key number of AES key (0 - 15) |
file_no | file number |
UFR_STATUS DL_API dfl_get_file_settings | ( | uint8_t | file_no, |
VAR uint8_t * | file_type, | ||
VAR uint8_t * | communication_mode, | ||
VAR uint8_t * | read_key_no, | ||
VAR uint8_t * | write_key_no, | ||
VAR uint8_t * | read_write_key_no, | ||
VAR uint8_t * | change_key_no, | ||
VAR uint32_t * | file_size, | ||
VAR int32_t * | lower_limit, | ||
VAR int32_t * | upper_limit, | ||
VAR uint32_t * | limited_credit_value, | ||
VAR uint8_t * | limited_credit_enable, | ||
VAR uint8_t * | free_get_value, | ||
VAR uint32_t * | record_size, | ||
VAR uint32_t * | max_number_of_rec, | ||
VAR uint32_t * | curr_number_of_rec, | ||
VAR uint8_t * | ex_unauth_operation, | ||
VAR uint8_t * | tmc_limit_conf, | ||
VAR uint8_t * | tm_key_type, | ||
VAR uint8_t * | tm_key_version, | ||
VAR uint32_t * | tmc_limit ) |
From library version 5.0.29 and firmware version 5.0.32. Desfire Light specific command.
file_no | file number 0, 1, 3, 4, 15 or 31 |
file_type | file type 0 - standard data file, 2 - value file, 4 - cyclic record file, 5 - transaction MAC file |
communication_mode | communication mode 0 - plain, 1 - MACed, 3 - enciphered |
read_key_no | read key number (0 - 4) |
write_key_no | write key number (0 - 4) |
read_write_key_no | read write key number (0 - 4) |
change_key_no | change key number (0 - 4) |
file_size | standard data file size |
lower_limit | value file lower limit |
upper_limit | value file upper limit |
limited_credit_value | value file limited credit value |
limited_credit_enable | value file limited credit enable (0 - disabled, 1 - enabled) |
free_get_value | value file get value without authentication (0 - disabled, 1 - enabled) |
record_size | cyclic record file size of record |
max_number_of_rec | cyclic record file maximal number of record |
curr_number_of_rec | cyclic record file number of used record |
ex_unauth_operation | TMC file exclude unauthorized operation |
tmc_limit_conf | TMC file limit configuration |
tm_key_type | TMC file key type AES |
tm_key_version | TMC key version |
tmc_limit | TMC file counter limit |