diff --git a/libfreefare/freefare.h b/libfreefare/freefare.h index 1189b97..4d571bc 100644 --- a/libfreefare/freefare.h +++ b/libfreefare/freefare.h @@ -141,6 +141,9 @@ extern const MadAid mad_reserved_aid; extern const MadAid mad_card_holder_aid; extern const MadAid mad_not_applicable_aid; +/* NFC Forum AID */ +extern const MadAid mad_nfcforum_aid; + Mad mad_new (const uint8_t version); Mad mad_read (MifareTag tag); int mad_write (MifareTag tag, Mad mad, const MifareClassicKey key_b_sector_00, const MifareClassicKey key_b_sector_10); diff --git a/libfreefare/mad.c b/libfreefare/mad.c index 3aff410..f81cb13 100644 --- a/libfreefare/mad.c +++ b/libfreefare/mad.c @@ -24,6 +24,10 @@ * AN10787 * MIFARE Application Directory (MAD) * Rev. 04 - 5 March 2009 + * + * NXP Type MF1K/4K Tag Operation + * Storing NFC Forum data in Mifare Standard 1k/4k + * Rev. 1.1 - 21 August 2007 */ #include "config.h" @@ -65,7 +69,7 @@ struct mad { uint8_t version; }; -/* Read key A */ +/* Public Key A value of MAD sector(s) */ const MifareClassicKey mad_public_key_a = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5 }; @@ -97,6 +101,12 @@ const MadAid mad_not_applicable_aid = { .application_code = 0x05, }; +/* NFC Forum AID */ +const MadAid mad_nfcforum_aid = { + .function_cluster_code = 0xe1, + .application_code = 0x03, +}; + /* * Allocate an empty new MAD. */