uFCoder 2.62
|
Functions specific to NT4H (Type 4) chips (e.g NTAG424DNA, with TagTamper support) More...
Functions | |
UFR_STATUS DL_API | nt4h_change_key (uint8_t auth_key_no, uint8_t key_no, IN uint8_t *new_key, IN uint8_t *old_key) |
Function changes AES key. | |
UFR_STATUS DL_API | nt4h_change_key_pk (IN uint8_t *auth_key, uint8_t key_no, IN uint8_t *new_key, IN uint8_t *old_key) |
Provided Key mode (PK) Function changes AES key. | |
UFR_STATUS DL_API | nt4h_change_sdm_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, uint8_t uid_enable, uint8_t read_ctr_enable, uint8_t read_ctr_limit_enable, uint8_t enc_file_data_enable, uint8_t meta_data_key_no, uint8_t file_data_read_key_no, uint8_t read_ctr_key_no, uint32_t uid_offset, uint32_t read_ctr_offset, uint32_t picc_data_offset, uint32_t mac_input_offset, uint32_t enc_offset, uint32_t enc_length, uint32_t mac_offset, uint32_t read_ctr_limit) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file. | |
UFR_STATUS DL_API | nt4h_change_sdm_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, uint8_t uid_enable, uint8_t read_ctr_enable, uint8_t read_ctr_limit_enable, uint8_t enc_file_data_enable, uint8_t meta_data_key_no, uint8_t file_data_read_key_no, uint8_t read_ctr_key_no, uint32_t uid_offset, uint32_t read_ctr_offset, uint32_t picc_data_offset, uint32_t mac_input_offset, uint32_t enc_offset, uint32_t enc_length, uint32_t mac_offset, uint32_t read_ctr_limit) |
Provided Key mode (PK) Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file. | |
UFR_STATUS DL_API | nt4h_change_standard_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) |
The function changes the access parameters of an existing standard data file. | |
UFR_STATUS DL_API | nt4h_change_standard_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) |
Provided Key mode (PK) The function changes the access parameters of an existing standard data file. | |
UFR_STATUS DL_API | nt4h_check_sdm_mac (uint32_t smd_read_counter, IN uint8_t *uid, IN uint8_t *auth_key, IN uint8_t *mac_in_data, IN uint8_t mac_in_len, IN uint8_t *sdm_mac) |
Helper function for the MAC of SDM checking. | |
UFR_STATUS DL_API | nt4h_decrypt_picc_data (IN uint8_t *picc_data, IN uint8_t *auth_key, IN uint8_t *picc_data_tag, IN uint8_t *uid, IN uint32_t *smd_read_cnt) |
Helper function for decryption of encrypted PICC data. | |
UFR_STATUS DL_API | nt4h_decrypt_sdm_enc_file_data (uint32_t smd_read_counter, IN uint8_t *uid, IN uint8_t *auth_key, IN uint8_t *enc_file_data, IN uint8_t enc_file_data_len) |
Helper function for decryption of encrypted file data. | |
UFR_STATUS DL_API | nt4h_enable_tt (uint8_t aes_key_no, uint8_t tt_status_key_no) |
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function enabling tag tamper feature. Authentication with application master key (key number 0) required. Warning. Enabling the Tag Tamper feature is permanent, it cannot be disabled once enabled. | |
UFR_STATUS DL_API | nt4h_enable_tt_pk (IN uint8_t *aes_key_ext, uint8_t tt_status_key_no) |
Provided Key mode (PK) NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function enabling tag tamper feature. Authentication with application master key (key number 0) required. Warning. Enabling the Tag Tamper feature is permanent, it cannot be disabled once enabled. | |
UFR_STATUS DL_API | nt4h_get_file_settings (uint8_t file_no, VAR uint8_t *file_type, VAR uint8_t *communication_mode, VAR uint8_t *sdm_enable, VAR uint32_t *file_size, 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 uint8_t *uid_enable, VAR uint8_t *read_ctr_enable, VAR uint8_t *read_ctr_limit_enable, VAR uint8_t *enc_file_data_enable, VAR uint8_t *meta_data_key_no, VAR uint8_t *file_data_read_key_no, VAR uint8_t *read_ctr_key_no, VAR uint32_t *uid_offset, VAR uint32_t *read_ctr_offset, VAR uint32_t *picc_data_offset, VAR uint32_t *mac_input_offset, VAR uint32_t *enc_offset, VAR uint32_t *enc_length, VAR uint32_t *mac_offset, VAR uint32_t *read_ctr_limit) |
Function returns file settings. | |
UFR_STATUS DL_API | nt4h_get_sdm_ctr (uint8_t auth_key_no, uint8_t file_no, uint8_t key_no, VAR uint32_t *sdm_read_ctr) |
Function supports retrieving of the current values of SDM reading counter. | |
UFR_STATUS DL_API | nt4h_get_sdm_ctr_no_auth (uint8_t file_no, VAR uint32_t *sdm_read_ctr) |
No authentication. Function supports retrieving of the current values of SDM reading counter. | |
UFR_STATUS DL_API | nt4h_get_sdm_ctr_pk (IN uint8_t *auth_key, uint8_t file_no, uint8_t key_no, VAR uint32_t *sdm_read_ctr) |
Provided Key mode (PK) Function supports retrieving of the current values of SDM reading counter. | |
UFR_STATUS DL_API | nt4h_get_tt_status (uint8_t aes_key_no, uint8_t key_no, VAR uint8_t *tt_perm_status, VAR uint8_t *tt_curr_status) |
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function supports retrieving of the permanent and current Tag Tamper Status. | |
UFR_STATUS DL_API | nt4h_get_tt_status_no_auth (VAR uint8_t *tt_perm_status, VAR uint8_t *tt_curr_status) |
No authentication NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function supports retrieving of the permanent and current Tag Tamper Status. | |
UFR_STATUS DL_API | nt4h_get_uid (uint8_t auth_key_no, uint8_t key_no, OUT uint8_t *uid) |
Function returns card UID if Random ID activated. Valid authentication is required. | |
UFR_STATUS DL_API | nt4h_get_uid_pk (IN uint8_t *auth_key, uint8_t key_no, OUT uint8_t *uid) |
Provided Key mode (PK) Function returns card UID if Random ID activated. | |
UFR_STATUS DL_API | nt4h_rid_read_ecc_signature (uint8_t auth_key_nr, uint8_t key_no, OUT uint8_t *uid, OUT uint8_t *ecc_signature, OUT uint8_t *dlogic_card_type) |
From library version 5.0.43 and firmware version 5.0.43. Function retrieves the asymmetric originality signature based on an asymmetric cryptographic algorithm Elliptic Curve Cryptography Digital Signature Algorithm (ECDSA) when the Random ID is activated. Authentication with valid key required. | |
UFR_STATUS DL_API | nt4h_rid_read_ecc_signature_pk (IN uint8_t *auth_key, uint8_t key_no, OUT uint8_t *uid, OUT uint8_t *ecc_signature, VAR uint8_t *dlogic_card_type) |
Provided Key mode (PK) From library version 5.0.43 and firmware version 5.0.43. Function retrieves the asymmetric originality signature based on an asymmetric cryptographic algorithm Elliptic Curve Cryptography Digital Signature Algorithm (ECDSA) when the Random ID is activated. Authentication with valid key required. | |
UFR_STATUS DL_API | nt4h_set_global_parameters (uint8_t file_no, uint8_t key_no, uint8_t communication_mode) |
Function sets file number, key number, and communication mode, before the using functions for reading and writing data into cards which are used for NTAG 2xx cards. | |
UFR_STATUS DL_API | nt4h_set_rid (uint8_t aes_key_no) |
Function enables card Random ID. Authentication with application master key (key number 0) required. | |
UFR_STATUS DL_API | nt4h_set_rid_pk (IN uint8_t *aes_key_ext) |
Provided Key mode (PK) Function enables card Random ID. | |
UFR_STATUS DL_API | nt4h_tt_change_sdm_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, uint8_t uid_enable, uint8_t read_ctr_enable, uint8_t read_ctr_limit_enable, uint8_t enc_file_data_enable, uint8_t meta_data_key_no, uint8_t file_data_read_key_no, uint8_t read_ctr_key_no, uint32_t uid_offset, uint32_t read_ctr_offset, uint32_t picc_data_offset, uint32_t mac_input_offset, uint32_t enc_offset, uint32_t enc_length, uint32_t mac_offset, uint32_t read_ctr_limit, uint8_t tt_status_enable, uint32_t tt_status_offset) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file. | |
UFR_STATUS DL_API | nt4h_tt_change_sdm_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, uint8_t uid_enable, uint8_t read_ctr_enable, uint8_t read_ctr_limit_enable, uint8_t enc_file_data_enable, uint8_t meta_data_key_no, uint8_t file_data_read_key_no, uint8_t read_ctr_key_no, uint32_t uid_offset, uint32_t read_ctr_offset, uint32_t picc_data_offset, uint32_t mac_input_offset, uint32_t enc_offset, uint32_t enc_length, uint32_t mac_offset, uint32_t read_ctr_limit, uint8_t tt_status_enable, uint32_t tt_status_offset) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file. | |
UFR_STATUS DL_API | nt4h_tt_get_file_settings (uint8_t file_no, VAR uint8_t *file_type, VAR uint8_t *communication_mode, VAR uint8_t *sdm_enable, VAR uint32_t *file_size, 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 uint8_t *uid_enable, VAR uint8_t *read_ctr_enable, VAR uint8_t *read_ctr_limit_enable, VAR uint8_t *enc_file_data_enable, VAR uint8_t *meta_data_key_no, VAR uint8_t *file_data_read_key_no, VAR uint8_t *read_ctr_key_no, VAR uint32_t *uid_offset, VAR uint32_t *read_ctr_offset, VAR uint32_t *picc_data_offset, VAR uint32_t *mac_input_offset, VAR uint32_t *enc_offset, VAR uint32_t *enc_length, VAR uint32_t *mac_offset, VAR uint32_t *read_ctr_limit, VAR uint8_t *tt_status_enable, VAR uint32_t *tt_status_offset) |
Function returns file settings. | |
Functions specific to NT4H (Type 4) chips (e.g NTAG424DNA, with TagTamper support)
UFR_STATUS DL_API nt4h_change_key | ( | uint8_t | auth_key_no, |
uint8_t | key_no, | ||
IN uint8_t * | new_key, | ||
IN uint8_t * | old_key ) |
Function changes AES key.
Authentication with the application master key is required.
auth_key_no | ordinal number of AES key into reader (0 - 15) |
key_no | key number 0 - 2 or 0 - 4 |
new_key | pointer to array contained new AES key |
old_key | pointer to array contained current AES key |
UFR_STATUS DL_API nt4h_change_key_pk | ( | IN uint8_t * | auth_key, |
uint8_t | key_no, | ||
IN uint8_t * | new_key, | ||
IN uint8_t * | old_key ) |
Provided Key mode (PK) Function changes AES key.
Authentication with the application master key is required.
auth_key | pointer to array contained AES key |
key_no | key number 0 - 2 or 0 - 4 |
new_key | pointer to array contained new AES key |
old_key | pointer to array contained current AES key |
UFR_STATUS DL_API nt4h_change_sdm_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, | ||
uint8_t | uid_enable, | ||
uint8_t | read_ctr_enable, | ||
uint8_t | read_ctr_limit_enable, | ||
uint8_t | enc_file_data_enable, | ||
uint8_t | meta_data_key_no, | ||
uint8_t | file_data_read_key_no, | ||
uint8_t | read_ctr_key_no, | ||
uint32_t | uid_offset, | ||
uint32_t | read_ctr_offset, | ||
uint32_t | picc_data_offset, | ||
uint32_t | mac_input_offset, | ||
uint32_t | enc_offset, | ||
uint32_t | enc_length, | ||
uint32_t | mac_offset, | ||
uint32_t | read_ctr_limit ) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file.
Due to the large number of parameters, the function is separated from the function for creating a standard data file.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
file_no | NTAG 413 - 1 or 2 NTAG 424 - 1 to 3 |
key_no | current change key number NTAG 413 - 0 to 2 NTAG 424 - 0 to 4 |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain |
read_key_no | reading key number (14 free access) |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (NTAG 424 only) (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4 (NTAG 424 only), 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data (NTAG 424 only) 0 - 2 or 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 2 or 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data (NTAG 424 only) |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data (NTAG 424 only) |
enc_length | length of encrypted part of file data (NTAG 424 only) |
mac_offset | mirror position of SDM MAC read_crt_limit value of SDM reading counter limit |
read_ctr_limit | read_ctr_limit |
UFR_STATUS DL_API nt4h_change_sdm_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, | ||
uint8_t | uid_enable, | ||
uint8_t | read_ctr_enable, | ||
uint8_t | read_ctr_limit_enable, | ||
uint8_t | enc_file_data_enable, | ||
uint8_t | meta_data_key_no, | ||
uint8_t | file_data_read_key_no, | ||
uint8_t | read_ctr_key_no, | ||
uint32_t | uid_offset, | ||
uint32_t | read_ctr_offset, | ||
uint32_t | picc_data_offset, | ||
uint32_t | mac_input_offset, | ||
uint32_t | enc_offset, | ||
uint32_t | enc_length, | ||
uint32_t | mac_offset, | ||
uint32_t | read_ctr_limit ) |
Provided Key mode (PK) Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file.
Due to the large number of parameters, the function is separated from the function for creating a standard data file.
aes_key_ext | pointer to array contained AES key aes_key_no ordinal number of AES key into reader (0 - 15) |
file_no | NTAG 413 - 1 or 2 NTAG 424 - 1 to 3 |
key_no | current change key number NTAG 413 - 0 to 2 NTAG 424 - 0 to 4 |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain |
read_key_no | reading key number (14 free access) |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (NTAG 424 only) (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4 (NTAG 424 only), 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data (NTAG 424 only) 0 - 2 or 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 2 or 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data (NTAG 424 only) |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data (NTAG 424 only) |
enc_length | length of encrypted part of file data (NTAG 424 only) |
mac_offset | mirror position of SDM MAC read_crt_limit value of SDM reading counter limit |
read_ctr_limit | value of SDM reading counter limit |
UFR_STATUS DL_API nt4h_change_standard_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 ) |
The function changes the access parameters of an existing standard data file.
The communication mode can be either plain or enciphered based on current access rights of the file, so current communication mode must be entered. Access rights are similar for Desfire cards.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
file_no | NTAG 413 - 1 or 2 NTAG 424 and NTAG 424 TT - 1 to 3 |
key_no | current change key number NTAG 413 - 0 to 2 NTAG 424 and NTAG 424 TT - 0 to 4 |
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 | reading key number |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
UFR_STATUS DL_API nt4h_change_standard_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 ) |
Provided Key mode (PK) The function changes the access parameters of an existing standard data file.
The communication mode can be either plain or enciphered based on current access rights of the file, so current communication mode must be entered. Access rights are similar for Desfire cards.
aes_key_ext | pointer to array contained AES key aes_key_no ordinal number of AES key into reader (0 - 15) |
file_no | NTAG 413 - 1 or 2 NTAG 424 and NTAG 424 TT - 1 to 3 |
key_no | current change key number NTAG 413 - 0 to 2 NTAG 424 and NTAG 424 TT - 0 to 4 |
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 | reading key number |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
UFR_STATUS DL_API nt4h_check_sdm_mac | ( | uint32_t | smd_read_counter, |
IN uint8_t * | uid, | ||
IN uint8_t * | auth_key, | ||
IN uint8_t * | mac_in_data, | ||
IN uint8_t | mac_in_len, | ||
IN uint8_t * | sdm_mac ) |
Helper function for the MAC of SDM checking.
Users need to know the SDM counter, UID and AES key for file data read.
smd_read_counter | value of SDM reading counter |
uid | pointer to array contained 7 bytes UID |
auth_key | pointer to array contained AES meta data read key |
mac_in_data | data from mac_input_offset to mac_offset |
mac_in_len | mac_input_offset - mac_offset |
sdm_mac | pointer to array contained 8 bytes SDM MAC |
UFR_STATUS DL_API nt4h_decrypt_picc_data | ( | IN uint8_t * | picc_data, |
IN uint8_t * | auth_key, | ||
IN uint8_t * | picc_data_tag, | ||
IN uint8_t * | uid, | ||
IN uint32_t * | smd_read_cnt ) |
Helper function for decryption of encrypted PICC data.
Function returns UID and SDM reading counter. Users need to know the AES key for metadata read (PICC data).
picc_data | pointer to array contained encrypted PICC data |
auth_key | pointer to array contained AES meta data read key |
picc_data_tag | if bit 7 set exist UID mirroring if bit 6 set exist SDM reading counter |
uid | pointer to array contained 7 bytes UID |
smd_read_cnt | pointer to value of SDM reading counter |
UFR_STATUS DL_API nt4h_decrypt_sdm_enc_file_data | ( | uint32_t | smd_read_counter, |
IN uint8_t * | uid, | ||
IN uint8_t * | auth_key, | ||
IN uint8_t * | enc_file_data, | ||
IN uint8_t | enc_file_data_len ) |
Helper function for decryption of encrypted file data.
Users need to know the SDM counter, UID and AES key for file data read.
smd_read_counter | value of SDM reading counter |
uid | pointer to array contained 7 bytes UID |
auth_key | pointer to array contained AES meta data read key |
enc_file_data | pointer to array contained encrypted part of file data |
enc_file_data_len | length of encrypted part of file data |
UFR_STATUS DL_API nt4h_enable_tt | ( | uint8_t | aes_key_no, |
uint8_t | tt_status_key_no ) |
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function enabling tag tamper feature. Authentication with application master key (key number 0) required. Warning. Enabling the Tag Tamper feature is permanent, it cannot be disabled once enabled.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
tt_status_key_no | 0 - 4, 14 free access |
UFR_STATUS DL_API nt4h_enable_tt_pk | ( | IN uint8_t * | aes_key_ext, |
uint8_t | tt_status_key_no ) |
Provided Key mode (PK) NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function enabling tag tamper feature. Authentication with application master key (key number 0) required. Warning. Enabling the Tag Tamper feature is permanent, it cannot be disabled once enabled.
aes_key_ext | ordinal number of AES key into reader (0 - 15) |
tt_status_key_no | 0 - 4, 14 free access |
UFR_STATUS DL_API nt4h_get_file_settings | ( | uint8_t | file_no, |
VAR uint8_t * | file_type, | ||
VAR uint8_t * | communication_mode, | ||
VAR uint8_t * | sdm_enable, | ||
VAR uint32_t * | file_size, | ||
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 uint8_t * | uid_enable, | ||
VAR uint8_t * | read_ctr_enable, | ||
VAR uint8_t * | read_ctr_limit_enable, | ||
VAR uint8_t * | enc_file_data_enable, | ||
VAR uint8_t * | meta_data_key_no, | ||
VAR uint8_t * | file_data_read_key_no, | ||
VAR uint8_t * | read_ctr_key_no, | ||
VAR uint32_t * | uid_offset, | ||
VAR uint32_t * | read_ctr_offset, | ||
VAR uint32_t * | picc_data_offset, | ||
VAR uint32_t * | mac_input_offset, | ||
VAR uint32_t * | enc_offset, | ||
VAR uint32_t * | enc_length, | ||
VAR uint32_t * | mac_offset, | ||
VAR uint32_t * | read_ctr_limit ) |
Function returns file settings.
file_no | NTAG 413 - 1 or 2, NTAG 424 - 1 to 3 |
file_type | 0 - standard data file |
communication_mode | communication mode, 0 - plain, 1 - MACed, 3 - enciphered |
sdm_enable | 0 - SDM disabled, 1 - SDM enabled |
file_size | file size in bytes |
read_key_no | reading key number |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (NTAG 424 only) (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4 (NTAG 424 only), 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data (NTAG424 only) 0 - 2 or 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 2 or 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data (NTAG 424 only) |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data (NTAG 424 only) |
enc_length | length of encrypted part of file data (NTAG 424 only) |
mac_offset | mirror position of SDM MAC |
read_ctr_limit | value of SDM reading counter limit |
UFR_STATUS DL_API nt4h_get_sdm_ctr | ( | uint8_t | auth_key_no, |
uint8_t | file_no, | ||
uint8_t | key_no, | ||
VAR uint32_t * | sdm_read_ctr ) |
Function supports retrieving of the current values of SDM reading counter.
auth_key_no | ordinal number of AES key into reader (0 - 15) |
file_no | file number of SDM file (2) |
key_no | key number 0 - 2 or 0 - 4 |
sdm_read_ctr | pointer to value of SDM reading counter |
UFR_STATUS DL_API nt4h_get_sdm_ctr_no_auth | ( | uint8_t | file_no, |
VAR uint32_t * | sdm_read_ctr ) |
No authentication. Function supports retrieving of the current values of SDM reading counter.
file_no | file number of SDM file (2) |
sdm_read_ctr | pointer to value of SDM reading counter |
UFR_STATUS DL_API nt4h_get_sdm_ctr_pk | ( | IN uint8_t * | auth_key, |
uint8_t | file_no, | ||
uint8_t | key_no, | ||
VAR uint32_t * | sdm_read_ctr ) |
Provided Key mode (PK) Function supports retrieving of the current values of SDM reading counter.
auth_key | pointer to array contained AES key |
file_no | file number of SDM file (2) |
key_no | key number 0 - 2 or 0 - 4 |
sdm_read_ctr | pointer to value of SDM reading counter |
UFR_STATUS DL_API nt4h_get_tt_status | ( | uint8_t | aes_key_no, |
uint8_t | key_no, | ||
VAR uint8_t * | tt_perm_status, | ||
VAR uint8_t * | tt_curr_status ) |
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function supports retrieving of the permanent and current Tag Tamper Status.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
key_no | 0 - 4 *uid 7 bytes UID length *ecc_signature 56 bytes ECC signature *dlogic_card_type |
tt_perm_status | tamper permanent status: I - invalid status, feature not activated; C - tamper seal closed; O - tamper seal opened |
tt_curr_status | tag tamper permanent status: I - invalid status, feature not activated; C - tamper seal closed; O - tamper seal opened |
UFR_STATUS DL_API nt4h_get_tt_status_no_auth | ( | VAR uint8_t * | tt_perm_status, |
VAR uint8_t * | tt_curr_status ) |
No authentication NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43. Function supports retrieving of the permanent and current Tag Tamper Status.
tt_perm_status | tag tamper permanent status: I - invalid status, feature not activated; C - tamper seal closed; O - tamper seal opened |
tt_curr_status | tag tamper permanent status: I - invalid status, feature not activated; C - tamper seal closed; O - tamper seal opened |
UFR_STATUS DL_API nt4h_get_uid | ( | uint8_t | auth_key_no, |
uint8_t | key_no, | ||
OUT uint8_t * | uid ) |
Function returns card UID if Random ID activated. Valid authentication is required.
auth_key_no | ordinal number of AES key into reader (0 - 15) |
key_no | ordinal number of AES key into reader (0 - 15) |
uid | pointer to array contained UID |
UFR_STATUS DL_API nt4h_get_uid_pk | ( | IN uint8_t * | auth_key, |
uint8_t | key_no, | ||
OUT uint8_t * | uid ) |
Provided Key mode (PK) Function returns card UID if Random ID activated.
Valid authentication is required.
auth_key | pointer to array contained AES key |
key_no | ordinal number of AES key into reader (0 - 15) |
uid | pointer to array contained UID |
UFR_STATUS DL_API nt4h_rid_read_ecc_signature | ( | uint8_t | auth_key_nr, |
uint8_t | key_no, | ||
OUT uint8_t * | uid, | ||
OUT uint8_t * | ecc_signature, | ||
OUT uint8_t * | dlogic_card_type ) |
From library version 5.0.43 and firmware version 5.0.43. Function retrieves the asymmetric originality signature based on an asymmetric cryptographic algorithm Elliptic Curve Cryptography Digital Signature Algorithm (ECDSA) when the Random ID is activated. Authentication with valid key required.
auth_key_nr | ordinal number of AES key into reader (0 - 15) |
key_no | 0 - 4 |
uid | 7 bytes UID length |
ecc_signature | 56 bytes ECC signature |
dlogic_card_type | card type value based on DLogic CardType enumeration |
UFR_STATUS DL_API nt4h_rid_read_ecc_signature_pk | ( | IN uint8_t * | auth_key, |
uint8_t | key_no, | ||
OUT uint8_t * | uid, | ||
OUT uint8_t * | ecc_signature, | ||
VAR uint8_t * | dlogic_card_type ) |
Provided Key mode (PK) From library version 5.0.43 and firmware version 5.0.43. Function retrieves the asymmetric originality signature based on an asymmetric cryptographic algorithm Elliptic Curve Cryptography Digital Signature Algorithm (ECDSA) when the Random ID is activated. Authentication with valid key required.
auth_key | pointer to array contained AES key auth_key_nr ordinal number of AES key into reader (0 - 15) |
key_no | 0 - 4 |
uid | 7 bytes UID length |
ecc_signature | 56 bytes ECC signature |
dlogic_card_type | card type value based on DLogic CardType enumeration |
UFR_STATUS DL_API nt4h_set_global_parameters | ( | uint8_t | file_no, |
uint8_t | key_no, | ||
uint8_t | communication_mode ) |
Function sets file number, key number, and communication mode, before the using functions for reading and writing data into cards which are used for NTAG 2xx cards.
This makes it possible to use existing functions for the block and linear reading and writing.
file_no | NTAG 413 - 1 or 2 NTAG 424 and NTAG 424 TT - 1 to 3 |
key_no | NTAG 413 - 0 to 2 NTAG 424 and NTAG 424 TT - 0 to 4 |
communication_mode | 0 - plain, 1 - MACed, 3 - enciphered |
UFR_STATUS DL_API nt4h_set_rid | ( | uint8_t | aes_key_no | ) |
Function enables card Random ID. Authentication with application master key (key number 0) required.
Warning. This operation is ireversibile.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
UFR_STATUS DL_API nt4h_set_rid_pk | ( | IN uint8_t * | aes_key_ext | ) |
Provided Key mode (PK) Function enables card Random ID.
Authentication with application master key (key number 0) required. Warning. This operation is ireversibile.
aes_key_ext | pointer to array contained AES key |
UFR_STATUS DL_API nt4h_tt_change_sdm_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, | ||
uint8_t | uid_enable, | ||
uint8_t | read_ctr_enable, | ||
uint8_t | read_ctr_limit_enable, | ||
uint8_t | enc_file_data_enable, | ||
uint8_t | meta_data_key_no, | ||
uint8_t | file_data_read_key_no, | ||
uint8_t | read_ctr_key_no, | ||
uint32_t | uid_offset, | ||
uint32_t | read_ctr_offset, | ||
uint32_t | picc_data_offset, | ||
uint32_t | mac_input_offset, | ||
uint32_t | enc_offset, | ||
uint32_t | enc_length, | ||
uint32_t | mac_offset, | ||
uint32_t | read_ctr_limit, | ||
uint8_t | tt_status_enable, | ||
uint32_t | tt_status_offset ) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file.
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43.
Due to the large number of parameters, the function is separated from the function for creating a standard data file.
aes_key_no | ordinal number of AES key into reader (0 - 15) |
file_no | 1 - 3 |
key_no | current change key number 0 - 4 |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain |
read_key_no | reading key number (14 free access) |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4, 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data |
enc_length | length of encrypted part of file data |
mac_offset | mirror position of SDM MAC |
read_ctr_limit | value of SDM reading counter limit |
tt_status_enable | tag tamper status mirroring (0 - disabled, 1 - enabled) |
tt_status_offset | mirror position of tag tamper status |
UFR_STATUS DL_API nt4h_tt_change_sdm_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, | ||
uint8_t | uid_enable, | ||
uint8_t | read_ctr_enable, | ||
uint8_t | read_ctr_limit_enable, | ||
uint8_t | enc_file_data_enable, | ||
uint8_t | meta_data_key_no, | ||
uint8_t | file_data_read_key_no, | ||
uint8_t | read_ctr_key_no, | ||
uint32_t | uid_offset, | ||
uint32_t | read_ctr_offset, | ||
uint32_t | picc_data_offset, | ||
uint32_t | mac_input_offset, | ||
uint32_t | enc_offset, | ||
uint32_t | enc_length, | ||
uint32_t | mac_offset, | ||
uint32_t | read_ctr_limit, | ||
uint8_t | tt_status_enable, | ||
uint32_t | tt_status_offset ) |
Function allows change parameters for secure dynamic messaging file, or change file type from standard data file to secure dynamic messaging file.
Provided Key mode (PK) NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43.
Due to the large number of parameters, the function is separated from the function for creating a standard data file.
aes_key_ext | pointer to array contained AES key aes_key_no ordinal number of AES key into reader (0 - 15) |
file_no | 1 - 3 |
key_no | current change key number 0 - 4 |
curr_communication_mode | current communication mode 0 - plain, 1 - MACed, 3 - enciphered |
new_communication_mode | new communication mode 0 - plain |
read_key_no | reading key number (14 free access) |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4, 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data |
enc_length | length of encrypted part of file data |
mac_offset | mirror position of SDM MAC |
read_ctr_limit | value of SDM reading counter limit |
tt_status_enable | tag tamper status mirroring (0 - disabled, 1 - enabled) |
tt_status_offset | mirror position of tag tamper status |
UFR_STATUS DL_API nt4h_tt_get_file_settings | ( | uint8_t | file_no, |
VAR uint8_t * | file_type, | ||
VAR uint8_t * | communication_mode, | ||
VAR uint8_t * | sdm_enable, | ||
VAR uint32_t * | file_size, | ||
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 uint8_t * | uid_enable, | ||
VAR uint8_t * | read_ctr_enable, | ||
VAR uint8_t * | read_ctr_limit_enable, | ||
VAR uint8_t * | enc_file_data_enable, | ||
VAR uint8_t * | meta_data_key_no, | ||
VAR uint8_t * | file_data_read_key_no, | ||
VAR uint8_t * | read_ctr_key_no, | ||
VAR uint32_t * | uid_offset, | ||
VAR uint32_t * | read_ctr_offset, | ||
VAR uint32_t * | picc_data_offset, | ||
VAR uint32_t * | mac_input_offset, | ||
VAR uint32_t * | enc_offset, | ||
VAR uint32_t * | enc_length, | ||
VAR uint32_t * | mac_offset, | ||
VAR uint32_t * | read_ctr_limit, | ||
VAR uint8_t * | tt_status_enable, | ||
VAR uint32_t * | tt_status_offset ) |
Function returns file settings.
NTAG 424 TT only. From library version 5.0.43 and firmware version 5.0.43.
file_no | 413 - 1 or 2; NTAG 424 - 1 to 3 |
file_type | 0 - standard data file |
communication_mode | communication mode, 0 - plain, 1 - MACed, 3 - enciphered |
sdm_enable | 0 - SDM disabled, 1 - SDM enabled |
file_size | file size in bytes |
read_key_no | reading key number |
write_key_no | writing key number |
read_write_key_no | reading and writing key number |
change_key_no | new change key number |
uid_enable | UID mirroring (0 - disabled, 1 - enabled) |
read_ctr_enable | SDM reading counter (0 - disabled, 1 - enabled) |
read_ctr_limit_enable | SDM reading counter limit (0 - disabled, 1 - enabled) |
enc_file_data_enable | using encrypted part of file data (NTAG 424 only) (0 - disabled, 1 - enabled) |
meta_data_key_no | key number for PICC data (UID and SDM read ctr) encryption 0 - 4 (NTAG 424 only), 14 no encryption, 15 no PICC data |
file_data_read_key_no | key number for MAC and encrypted part of file data (NTAG424 only) 0 - 2 or 0 - 4, 15 no MAC |
read_ctr_key_no | key number for SDM reading counter retrieving 0 - 2 or 0 - 4, 14 free, 15 no access |
uid_offset | mirror position of UID if PICC data aren’t encrypted |
read_ctr_offset | mirror position of SDM reading counter if PICC data aren’t encrypted |
picc_data_offset | mirror position of encrypted PICC data (NTAG 424 only) |
mac_input_offset | offset in the file where the SDM MAC computation starts |
enc_offset | mirror position of encrypted part of file data (NTAG 424 only) |
enc_length | length of encrypted part of file data (NTAG 424 only) |
mac_offset | mirror position of SDM MAC |
read_ctr_limit | value of SDM reading counter limit |
tt_status_enable | tag tamper status (0 - disabled, 1 - enabled) |
tt_status_offset | mirror position of tag tamper status |