Take the 2-minute tour ×

I am trying to install an applet which uses security classes (Cipher, RandomData and MessageDigest), but always get an 6F50 error when trying to install it. The package is loaded correctly but the applet cannot be instantiated. I am allocating all objects in the constructor and the algorithms are supported by the card (at least according to the datasheet). If I comment out all security classes references, the applet loads and installs properly. I've tried allocating byte[] and Object's and it works, so this is not a space related problem (64K card with nothing else on it). I am using the SIM Alliance Loader v2 to load the applet. 'Regular' (non-crypto and STK) applets work fine.

The card supports Java Card 2.1.1 and a subset of Global Platform 2.1.1. Specs are here: http://shop.shadytel.com/sim_datasheet.pdf

Any ideas as to what the problem might be?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It's hard to tell what the problem is as the card returns a proprietary status word that it normally should not return. The 6Fxx error codes are used for unknown errors in the ISO/IEC 7816-4 standards. The value 50 is therefore proprietary to the smart card implementation. Contact the vendor.

The datasheet shows us a very limited Java Card platform, it only shows support for the following cryptographic algorithms:

  • DES and TDEA (triple DES)
  • secure and pseudo random
  • SHA-1

So if you go outside of these specifications you should expect a status word denoting an error. Normally you would expect 6A80 though, indicating something is wrong within the command data. The fact that you get an error while instantiating the applet shows that the code is accepted, but that instantiating or initializing one of the cryptographic algorithms fails.

If you have a good debugging environment (as good as a must for Java Card development), then you should be able to step through the Java Card static install method and applet constructor.

share|improve this answer
BTW, I feel honored trying to help you with your single question you asked after 1060 answers. –  owlstead Sep 14 '13 at 15:48
Thanks :) I got the cards through a 3rd party, hopefully they can get in touch with the manufacturer or know something. I tried SHA1 or RandomData only and I still get an error. Loading using checksum+encryption with the OTA key works, so at least 3DES seems to be working. I don't know what is considered a good debugging environment, but I probably don't have one.... –  Nikolay Elenkov Sep 15 '13 at 12:47
This sentence in the data sheet: 'Maximum crypto algorithm classes: 10' looks somewhat suspicious. If 'classes' actually refers to instances, and the internal applets have used all those up, that could be the cause of the error. –  Nikolay Elenkov Sep 15 '13 at 12:57
Apparently those cards are now being sold by insidesecure.com –  Nikolay Elenkov Sep 15 '13 at 13:06
As for the debugging environment, I'm using JCOP, but that relies on the JCOP simulator for debugging, which is a rather different platform than the one you are running. Normally these cards are either debugged by running a debugger on a card, emulator or simulator, all platform specific. Those are normally included with SDK's that are delivered with the card. Without that you could implement each part of the install() method/constructor in separate parts of the process() method (i.e. different APDU's) and debug the old fashioned way, much like print statements. –  owlstead Sep 16 '13 at 16:38
show 9 more comments

Your Answer


