MIFARE_DESFIRE_KEY(3)
β¨ MIFARE_DESFIRE_KEY(3) β¨
okay bestie, so this is a page from the Library Functions Manual β it's the MIFARE_DESFIRE_KEY one, third section, the whole ~keys manipulation~ situation. sit down, grab a strawberry π, we're doing crypto key management.
π NAME π
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_free β the Mifare DESFire keys Manipulation Functions. that's the whole squad, they roll together π
π LIBRARY π
Mifare card manipulation library (libfreefare, and you link it with -lfreefare) π¦
β¨ SYNOPSIS β¨
#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);
like. look at that array of function signatures. it's giving organized. it's giving I know exactly what I'm doing. π₯
π DESCRIPTION π
so the mifare_desfire_key_*() family is your whole girlboss toolkit for managing Mifare DESFire keys. that's it, that's the vibe.
the mifare_desfire_des_key_new(), mifare_desfire_3des_key_new(), mifare_desfire_3k3des_key_new() and mifare_desfire_ades_key_new() functions (and yes, we spelled that last one exactly how the page spells it, no notes π) allocate a brand new key stuffed with the value data you hand them. and the key version? it gets set to 0. fresh out the box, zero energy, iconic.
then there's the with_version girlies β mifare_desfire_des_key_new_with_version(), mifare_desfire_3des_key_new_with_version(), mifare_desfire_3k3des_key_new_with_version() and mifare_desfire_aes_key_new_with_version(). they do the exact same thing as the ones above, EXCEPT for the version part:
- for DES, 3DES and 3K3DES, the key version gets read from
valueπ - for AES, it gets set to
versionβ¨
want to peek at the version of a MifareDESFireKey? that's mifare_desfire_key_get_version(). want to change it? that's mifare_desfire_key_set_version.() π«Ά
and listen β you HAVE to callmifare_desfire_key_free()on every singleMifareDESFireKeyonce you're done with it, otherwise that memory is never coming back. no cap. free your keys or your keys will live in your RAM rent-free forever π
πΈ RETURN VALUES πΈ
the key allocation functions return the allocated key... or NULL if things went sideways. so like, check for NULL, bestie. always. π
π¦ SEE ALSO π¦
mifare_desfire(3)β go read that one next, iykyk π
π AUTHORS π
Romain Tartiere <romain@il4p.org> β the actual main character who wrote all of this. we stan π«Ά
and that's the whole page, fr fr π this was the MIFARE_DESFIRE_KEY(3) manual from Debian, dated July 20, 2010 β and the page name is literally MIFARE_DESFIRE_KEY(3) again, because manpages love saying goodbye the same way they said hello. slay, periodt π
β¨
π¦ where this page comes from
- debian bookworm: libfreefare-doc 0.4.0-2.1 Β· LGPL-3.0-or-later
- debian trixie: libfreefare-doc 0.4.0-2.3 Β· LGPL-3.0-or-later
- nixos 26.05: libfreefare 0.4.0
- nixpkgs unstable: libfreefare 0.4.0
- ubuntu jammy: libfreefare-doc 0.4.0-2.1build1 Β· LGPL-3.0-or-later
- ubuntu noble: libfreefare-doc 0.4.0-2.3build2 Β· LGPL-3.0-or-later
- ubuntu questing: libfreefare-doc 0.4.0-2.3build2
- ubuntu resolute: libfreefare-doc 0.4.0-2.3build3 Β· LGPL-3.0-or-later
- ubuntu stonking: libfreefare-doc 0.4.0-2.4build1 Β· LGPL-3.0-or-later
- Copyright (C) 2010 Romain Tartiere
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms