1. Since the launch of Kitkat, Android claims that Secure Element is not required for Host Card emulation. If its not required then, how does anyone can store any card details in Android ?

  2. There is OffHostApdu Service also which developer.android.com says to refer to incase if our android app has access to Secure Element - Can anyone explain

  3. Also, is there any limit on memory of Secure Element data ?

有帮助吗?

解决方案

Since the launch of Kitkat, Android claims that Secure Element is not required for Host Card emulation. If its not required then, how does anyone can store any card details in Android ?

With Android Kitkat you have two possible ways to do card emulation:

  1. Host based card emulation. In this emulation you write an Android service that emulates a card that responds to ISO7816-4 APDU commands. The service is able to store data just like any other Android service or intent.

  2. Off host card emulation. Here the card emulation code resides within the secure element. In general these card emulations can not be implemented by users but are implemented by your phone manufacturer, telephone provider or bank. Access for ordinary users is not possible because the keys to install applets on the secure element are secret. The secure element has no access to the host to store data, but it can use the non volatile memory provided by the secure element itself.

Each card emulation must be registered with an AID (application identifier). These AIDs can either be registered for a host based card emulation or for an off host card emulation.

If a NFC reader starts talking to your phone it will send out a SELECT APPLICATION command containing the AID that it want to talk to. Once the NFC chip receives such a command it will check it's internal registry of registered card emulations and route everything that is registered for the secure element to the secure element. All other communication is routed to the host. The host will check it's own registry of available off-host card emulations and start/activate off-host card emulations services if it finds a matching AID.

Also, is there any limit on memory of Secure Element data?

Yes, sure there is a limit. If there wouldn't be a limit we could just forget about hard-disks and expensive storage, buy one secure element and store all the data of the world on it :-)

The exact amount of free memory on a secure element depend on what kind of secure element is built in your phone. Different brands and models come with different memory sizes. Also the memory is limited if there are applets pre installed on the secure element. You usually don't have to worry about this because it is highly unlikely that you'll ever get the keys to install an applet on the secure element anyways.

In general anything from 64kb of storage up to several gigabytes is possible.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top