Search code examples
iostagsnfcmifarenxp-microcontroller

Using an Apple Wallet NFC Pass as an NFC tag


Although many topics have already talked about the impossibility for an iPhone to emulate an NFC tag, I found this document that talks about card emulation based on the PassKit (on page 6).

By imagining that I have completed the steps to obtain an NFC certificate from Apple and that I have an NFC reader capable of reading Apple VAS passes, is it possible to create a PassKit that allows the iPhone to behave like an NFC tag, for example as a Mifare DESFire tag?


Solution

  • I don't think using NFC Passkit allows you to behave like a Mifare DESfire Tag, this seems very limited to "Reward Card information" it just provides some extra info to a card reader that knows how to send Apple's Value Added Services Protocol over NFC (Not all card readers/POS terminals can do this)

    If you look at the Apple Doc's

    https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/TopLevel.html#//apple_ref/doc/uid/TP40012026-CH2-DontLinkElementID_3

    and

    https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/LowerLevel.html#//apple_ref/doc/uid/TP40012026-CH3-SW5

    You get to specify

    message, string, Required. The payload to be transmitted to the Apple Pay terminal. Must be 64 bytes or less. Messages longer than 64 bytes are truncated by the system.

    encryptionPublicKey, string, Optional. The public encryption key used by the Value Added Services protocol. Use a Base64 encoded X.509 SubjectPublicKeyInfo structure containing a ECDH public key for group P256.

    So Contactless bank cards conform the the NFC Forums Type 4 Specification, the Type 4 specification is low level and defines a method interact with a Higher level protocol beginning with the selection of an AID (Application ID), how you interact act with the card after the AID selection is up to each Application Specification.

    So Banks, Visa, MasterCard, etc and the NDEF Standard all have their own AID numbers, so I guess that Apple also have an AID for their Value Added Services Protocol.

    A Mifare DESFire tag is also a NFC Forums Type 4 Tag and can be programmed to respond to the NDEF AID and other custom AID's though I'm not sure it can be programmed to be able to respond to the AID used for Bank cards or to respond to Apple's Value Added Services Protocol.

    So in General this Apple NFC feature allows you to provide some extra info to Apple Pay's Wallet App so it responds with some extra custom information to a NFC reader that conforms to Apple's Pay standards. So very restrictive in what it can do.

    Whereas the Mifare DESFire tag is a much more flexible implementation of the lower level NFC standards.