0

I am new at SIM cards...

I developed a JavaCard applet and I try to run it on UICC. My applet does some non-trivial computation like for example the elliptic curve cryptography, CMAC ... That is why its performance is a crucial issue.

I experimented a little and I found out that my applet runs much faster in an ordinary smartcard reader after USIM selection and sending terminal profile (all bytes 0xFF). I admit I actually do not know why this happens...

Then I tried to run my applet inside a smart phone. I access my applet through seek-for-android API. I thought that USIM selection and sending terminal profile is done automatically by OS (Android) after inserting SIM card. However the performance is quite poor, it seems that the "magic procedure" of selecting USIM and sending terminal profile was not performed... So I tried sending my own terminal profile as on smartcard reader through seek-for-android API. USIM selection responded with 0x9000. Then I get 0x6E00 response to SEND TERMINAL PROFILE command, although this APDU works correctly in an ordinary smartcard reader.

Could you please explain me, what is going on? Where should I look for information?

Why does this procedure (USIM and terminal profile) improve performance?

Is this done automatically by OS in my smartphone?

If not, can I do it somehow programatically to improve performance of my applet?

Why do I get 6E00 response to SEND TERMINAL PROFILE command via seek-for-android?

Thanks a lot!

vojta
  • 5,591
  • 2
  • 24
  • 64
  • Whu you want to send your Terminal profile it will be send by mobile OS.You are getting 6E00 as seek for android api always change the class byte to 0x80. – Anurag Sharma Oct 06 '14 at 12:17
  • Terminal profile should be called with CLA = 0x80 according to ETSI: http://www.etsi.org/deliver/etsi_ts/102200_102299/102221/11.01.00_60/ts_102221v110100p.pdf, section 10.1.2 ... – vojta Oct 07 '14 at 06:12
  • let me know your requirment why u need terminal profile?you can develop separate applet and do your tasks. – Anurag Sharma Oct 07 '14 at 06:14
  • Hi, thanks for your comment! I want to improve my applets performace by 3G session initialization. I was told that 3G session initialization consists of two steps: USIM selection and terminal profile sending. Using ordinary smart card reader this procedure improved performance of my applet massively. I would like to do the same procedure in a phone, because performace in a phone seems to be as bad as in the smart card reader without 3G session. – vojta Oct 07 '14 at 06:44
  • USIM selection and terminal profile will be send by phone itself...you can move you code to different applet and perform your tasks. – Anurag Sharma Oct 07 '14 at 07:07
  • Here you got `6E00` because the receiving entity that receive `Terminal Profile` command do not have handling of this command, please check with the receiving application.Kindly check with following scenario : `Cold Reset` and then send `TP` (Terminal Profile) – Bhanu Nov 30 '14 at 18:19
  • Dear Vojta, may I ask you to list name of some development-tools and specifications for me? I want to program for SIM and USIM cards also, but I haven't any idea where I must start. It is more appreciated if you can send me some specifications. I already read Global Platform and Java Card specifications and ISO7816. but nothing else! What else am I need to learn/read? – Ebrahim Ghasemi Mar 11 '15 at 20:00
  • 1
    @Abraham Have a look at https://code.google.com/p/seek-for-android/wiki/UsingSmartCardAPI. As a development tool I used standard Eclipse for Android, I do not think there is any better option. – vojta Mar 12 '15 at 06:41
  • @vojta Any other specification and Standards? (For SIM/USIM cards) – Ebrahim Ghasemi Mar 12 '15 at 07:53
  • @Abraham I did not use any. Unfortunately, I find the world of SIM cards very confusing, it is much more complicated than Global Platform or JavaCard. Everything depends on you SIM vendor. Ask him, that is the easiest way I think. – vojta Mar 12 '15 at 08:39

0 Answers0