Questions tagged [javacard]

Java Card refers to a technology that allows Java-dd applications (applets) to be run securely on smart cards and similar small memory footprint devices.

Java Card is the tiniest of Java targeted for embedded devices, typically smart cards. Java Card gives developers the ability to program the device and make them application specific. It is widely used in SIM cards (used in GSM mobile phones) and/or NFC secure elements, ATM cards (containing an EMV chip), and machine readable travel documents.

The first Java Card was introduced in 1996 by Schlumberger's card division which later merged with Gemplus to form Gemalto. Java Card products are based on the Java Card specifications developed by Sun Microsystems (which is now Oracle Corporation). Many Java Card products rely on the GlobalPlatform specifications for the secure management of applications on the card (download, installation, personalization, deletion). GlobalPlatform was created to manage OpenPlatform, which was an initiative of Visa Inc.

The main design goals of Java Card are portability and security. Although the Java classes are initially compiled using the Java SE compiler there are many restrictions on Java Card. For instance, Java Card Classic does not support String and integer support is optional; object instances are created in persistent memory instead of RAM by default. Java Card has some features that are not present in J2SE as well: application isolation through the so-called applet firewall and a transaction mechanism.

991 questions
8
votes
3 answers

Installing applet in javacard

I made a .cap file of the popular "Hello World" javacard code via Eclipse And now I want to load it in a real javacard via GPShell and ACR38 smart card reader. question: Am I need any key to load the .cap file in the card? I mean, should I…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
8
votes
1 answer

Use SIM card slot as a smart card reader in Android phones

I am working with Android phones that have 2 SIM card slots. I want to know if there is a way to use one of these slots to read another type of card, like JavaCards?
saber safavi
  • 452
  • 3
  • 8
7
votes
2 answers

Strange Invalid CLA command (6E 00) on Java SmartCard IO

I am writing a smart card application and after a successful selection of the application with its AID, when it gets to sending Get Processing Options I get 6E 00 as response - Invalid CLA command. This is part of the code that sends the command and…
Olantobi
  • 869
  • 1
  • 8
  • 16
7
votes
2 answers

Java Card Object Instance in Transient Memory

I am working on a Java Card applet (for Java Card 2.2.1) which requires some temporary objects for processing APDU commands. I have questions about correct memory management. I have spent plenty of time on researching on the issues, but no where I…
M.Mahdipour
  • 592
  • 1
  • 7
  • 21
7
votes
2 answers

Which objects are persistent in Java Card, and when?

This question is twofold, but hopefully shouldn't be unreasonably long to answer, despite its own length. Feel free to answer only part of it, though, and sorry for making it so exhaustive! Which objects are persisted? Which objects are…
Ekleog
  • 1,054
  • 7
  • 19
7
votes
2 answers

Convert Java Applet CAP file to *.class for decompilation

Here is a CAP file possible containing a malware code, without source code, and also without an export file. It is a CAP file for old platform version, i.e. GP211. I have a big experience Java reverse-engineering in Classic JVM and Dalvik. But Java…
SmInc
  • 235
  • 3
  • 11
7
votes
2 answers

Java Card: Can applets be installed by other applets?

In Java Card, is it generally possible for new applications to be installed from within the context of an existing application on the card, for example by sending the new code via an application-defined messaging format and then creating a new…
lxgr
  • 3,719
  • 7
  • 31
  • 46
7
votes
1 answer

Get Data APDU command different tags and response format

As you may know, Gloabal Platform Card Specification defines a command named Get Data to retrieve some information from the smart card. GlobalPlatformPro is one of the popular tools for communication with smart cards. When I list the installed…
EbraHim
  • 2,279
  • 2
  • 16
  • 28
7
votes
2 answers

Using a single Cipher object or two different objects for decrypt and encrypt operations?

As you know, when we want to do cryptography operations using Java Cards, we must use Cipher objects. The question that I have is actually efficiency related. Let assume that I want to do some Encryption and Decryption operations using an AES key.…
EbraHim
  • 2,279
  • 2
  • 16
  • 28
7
votes
1 answer

Java Card applet EEPROM vs RAM testing

One of typical bugs in Java Card applets is using the persistent memory for temporary variables which are supposed to be in RAM. These bugs can slow down the applet and cause some serious troubles (e.g. Symptoms of EEPROM damage). Unit tests can…
vojta
  • 5,591
  • 2
  • 24
  • 64
7
votes
3 answers

Fast bit shift of a byte array - CMAC subkeys

I need to implement as fast as possible left bit shift of a 16-byte array in JavaCard. I tried this code: private static final void rotateLeft(final byte[] output, final byte[] input) { short carry = 0; short i = (short) 16; …
vojta
  • 5,591
  • 2
  • 24
  • 64
7
votes
4 answers

Java Card applets, secure data transmission and Secure Channel

I want to write my applet in a way that its APDU commands and status words wasn't be clear in the transmission channel between my card and my reader. I mean I don't want to send APDU commands and responses to be plain text for third parties. I think…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
7
votes
2 answers

How to work with SIM cards (Installing applet)

I have a smart card with the following ATR: ATR = 3B 9E 94 80 1F 42 80 31 00 73 BE 21 10 66 54 59 53 04 4C 25 CF. Based on the output of atr-parse.appspot.com I found that it is a MCI (Mobile Communication Company of Iran) SIM card. These are the…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
7
votes
2 answers

JavaCard - pure software implementation of ECC over GF(2^n)

I have smartcards by NXP that support ECC over GF(p) and that do not support ECC over GF(2^n). In my project I need to use this particular type of smartcard (thousands of instances are used already). However, I need to add verification of EC…
vojta
  • 5,591
  • 2
  • 24
  • 64
7
votes
1 answer

SIM toolkit application - Javacard development kit

I'm trying to develop a STK application but I don't know where to get the development kit. Right now for Javacard I'm getting the one from Oracle's website, but it doesn't have the sim.toolkit package. I don't want to buy it from Gemalto, etc. Is…
jlanza
  • 1,208
  • 3
  • 23
  • 43
1
2
3
66 67