Access The Sim Card with an Android Application

Authentication scheme for an Android application: When the SIM card is locked or exhanged by another, the app stops working

If you lock your app with SIM properties and requires those properties to be presented for unlocking the app, have you thought about where to store those properties in the app (hard coded, database, file, Preferences,...)? Or are you thinking to contact the server for verification? Both way, you may end up in a complex solution with possible security flaws. SIM serial number is something unique but at the same time it is public, you can't rely on this property to lock your app.

TelephonyManager class is the gateway for accessing SIM properties( this class also exposes users privacy in a number of ways). As of now, there is no android crypro API exposed to perform cryptographic operations in the SIM. But, since your customer can contact the operator, you may consider to ask the operator to sign your app. In that case, you may have a way to use their SIM card as a secure element. There is a discussion on this thread. PIN code based with a limited number of attempts is another way to implement a simple authentication for accessing your app. You may implement this at the application layer without involving the SIM card.

Hope this helps.

How to store android application data on sim card using NFC?

tl;dr - it is not currently possible without enormous effort.

You want to use the SIM card as the Secure Element in Card Emulation mode - this is the approach favoured by GSM Association. To access the Secure Element (on SIM or Integrated Chip), you need to use a Trusted Service Manager (TSM). In your case, the TSM would send data to your SIM card using binary SMS messages. The problem is that it is very early days for NFC on mobile phones. Tag reading/writing is simple enough but accessing the Secure Element is not. There are very limited trials of NFC SmartPhones using SIM as secure element for Card Emulation, and the trials are all currently limited to a specific Mobile Network Operator (MNO) in specific countries.

If you do want to do this, you need to read the specifications, write a TSM and then get the necessary contracts with the MNOs to be allowed to use their SIMs.

Good luck!



Related Topics



Leave a reply



Submit