DOKK / manpages / debian 12 / libfreefare-doc / mifare_desfire_3k3des_key_new.3.en
MIFARE_DESFIRE_KEY(3) Library Functions Manual MIFARE_DESFIRE_KEY(3)

mifare_desfire_des_key_new, mifare_desfire_3des_key_new, mifare_desfire_3k3des_key_new, mifare_desfire_aes_key_new, mifare_desfire_des_key_new_with_version, mifare_desfire_3des_key_new_with_version, mifare_desfire_3k3des_key_new_with_version, mifare_desfire_aes_key_new _with_version, mifare_desfire_key_get_version, mifare_desfire_key_set_version, mifare_desfire_key_freeMifare DESFire keys Manipulation Functions

Mifare card manipulation library (libfreefare, -lfreefare)

#include <freefare.h>

MifareDESFireKey
mifare_desfire_des_key_new(uint8_t value[8]);

MifareDESFireKey
mifare_desfire_3des_key_new(uint8_t value[16]);

MifareDESFireKey
mifare_desfire_3k3des_key_new(uint8_t value[24]);

MifareDESFireKey
mifare_desfire_aes_key_new(uint8_t value[16]);

MifareDESFireKey
mifare_desfire_des_key_new_with_version(uint8_t value[8]);

MifareDESFireKey
mifare_desfire_3des_key_new_with_version(uint8_t value[16]);

MifareDESFireKey
mifare_desfire_3k3des_key_new_with_version(uint8_t value[24]);

MifareDESFireKey
mifare_desfire_aes_key_new_with_version(uint8_t value[16], uint8_t version);

uint8_t
mifare_desfire_key_get_version(MifareDESFireKey key);

void
mifare_desfire_key_set_version(MifareDESFireKey key, uint8_t version);

void
mifare_desfire_key_free(MifareDESFireKey key);

The () family of functions allows management of Mifare DESFire keys.

The (), (), () and () alocate a new key with the provided data value. The key version is set to 0.

The (), (), () and () functions are equivalent to the previous functions except that the key version is read from value (DES, 3DES, 3K3DES) or set to version (AES).

The version of a MifareDESFireKey can be extracted using () and changed using ()

The () has to be called for each MifareDESFireKey after usage to reclaim memory.

Key allocations functions return the allocaed key of NULL on failure.

mifare_desfire(3)

Romain Tartiere ⟨romain@il4p.org⟩

July 20, 2010 Debian