[General Questions and Answers] kennymccormic:
Hi,

Yes, but with many limitations.

There are different types of secure elements. E.g. a phone may have an embedded secure element (a chip soldered into the phone), an NFC UICC (a SIM card that acts as a secure element) and a removable secure element in another form factor (e.g. MicroSD card). More than one of these secure elements may coexist in one device.

Some secure elements (e.g. NXP's SmartMX) can emulate MIFARE Classic. In general secure elements use standard smartcard communication protocols. Thus, they can be accessed using APDUs (as defined in ISO/IEC 7816-4).

Most (or all?) secure elements are based on JavaCard technology. Note that this is not a format, but a specification of the execution environment for applications. I.e. JavaCard defines a Java-based API and a Java virtual machine that runs Java applications (called applets) in JavaCard byte code.

Thus any application that runs on a secure element is a JavaCard application. For instance if a bank implements an EMV compliant credit card to be used on a secure element, this credit card applet would be a JavaCard application. Similarly, whenever you want the secure element to process APDU commands, you would create just another JavaCard application to handle your APDU commands.

Typically in Japan you may also find secure elements that emulate FeliCa (though I have not seen any of them yet).

Regarding ISO/IEC 14443: This is the contactless communication protocol used by smartcards/by the secure element (except for FeliCa which uses a different communication protocol). The different layers of ISO/IEC 14443 define modulation, coding, anti-collision (i.e. enumeration of cards if multiple cards are visible to a reader), selection, framing and a transport protocol. For layers below the transport protocol, ISO/IEC 14443 is split into two different protocols: Type A and Type B. Not all smartcards/NFC tags support all protocol layers.

For instance MIFARE Ultralight uses a proprietary protocol on top of the framing protocol of ISO/IEC 14443-3 Type A. MIFARE Classic also uses a proprietary protocol on top of ISO/IEC 14443-3 Type A (though it uses a slightly different framing).

A smartcard that uses ISO/IEC 7816-4 APDUs over the contactless interface (i.e. a typical secure element), exchanges these APDUs on top of the transport protocol defined in ISO/IEC 14443-4. This transport protocol is the same for ISO/IEC14443 Type A and Type B. Thus, secure elements can use either ISO/IEC14443 Type A or Type B. A secure element that emulates MIFARE Classic will use Type A, as MIFARE Classic is (partly) based on that protocol.

Software card emulation (or host card emulation) using NXP's NFC controller PN544 (or its successor PN547) can only "cards" using the transport protocol of ISO/IEC 14443-4 (e.g. no FeliCa, no ISO/IEC 15693). (Either as a Tpye A or as a Type B "card".) Thus, no proprietary protocols below that transport protocol can be emulated (e.g. no MIFARE Classic, no MIFARE Ultralight). Also the UID (unique identifier) used during the anti-collision phase will be a new random value for every activation through a contactless reader.

So you could emulate an EMV payment card (but you are not limited to EMV).

Unfortunately, the only manufacturer of NFC controller chipsets that was willing to provide me datasheets & user manuals of their NFC controllers was NXP (and even they release them only under a strict NDA). Broadcom and others were not willing to share such information with academic institutions. Thus, I have no information on the software card emulation capabilities of other NFC controllers.

For Android:

Embedded secure element on Android devices:

com.android.nfc_extras

This API is available at least on Google's Nexus devices and Samsung Galaxy S3.

Nikolay explains how to use that API: http://nelenkov.blogspot.nl/2012/08/accessing-embedded-secure-element-in.html. You can also browse the source code in AOSP: https://android.googlesource.com/platform/frameworks/base/+/master/nfc-extras/

UICC based secure elements and virtually any other type of secure element including embedded secure elements:

SEEK-for-Android (based on simalliance's standardized Open Mobile API)

This API is available at least in Samsung Galaxy S3, Samsung Galaxy S2 NFC, Sony Xperia S, though all three devices implement only access to the UICC through this API.

You can find details on this API here: http://code.google.com/p/seek-for-android/

Software card emulation:

Doug Yeager's extensions to the Android NFC API

These API extensions are available on CyanogenMod since 9.1 and will soon be integrated into our SuperSmile ROM. The current implementation will only work with NXP's NFC controller chipset.

I'm not quite sure what you are trying to achive here.

See above.

Hope that sheds some light on the card emulation topic.

Best regards,

Michael