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
5
votes
0 answers

Verify authenticity of Java Card applet codebase without trusting the applet itself

We are developing a JavaCard-based security sensitive application. Our goal is to allow client code communicating with a GlobaPlatform 2.2+ based JavaCard applet to convince itself that it's actually talking to a specific (and verifiable) version of…
5
votes
1 answer

How does Elliptic Curve Diffie Hellman work on JavaCard, in combination with Java?

I'm trying to get Elliptic Curve Diffie Hellman to work on a JavaCard (version 2.2.1). On the JavaCard, I have the following code right now: byte temp[] = new byte[100]; byte secret[] = new byte[100]; byte size =…
kokx
  • 1,706
  • 13
  • 19
5
votes
2 answers

Using RSA for modulo-multiplication leads to error on Java Card

Hello I'm working on a project on Java Card which implies a lot of modulo-multiplication. I managed to implement an modulo-multiplication on this platform using RSA cryptosystem but it seems to work for certain numbers. public byte[]…
Alberto12
  • 509
  • 2
  • 16
5
votes
5 answers

How to choose Secure Channel Protocol to use?

What does it mean that some smart card support SCP 01 and SCP02? And how to choose between those two? Is it predefined in security domain or there is some command to select one or other choice?
Mario Drzic
  • 157
  • 2
  • 10
5
votes
1 answer

Java Card 2.2.2: temporary RSA public key as transient

I'm designing a Java Card (2.2.2 thus Classic) applet that will, at each use, receive a RSA public key (validated using means immaterial to the question), then use that RSA public key to verify an RSA signature. How can I keep that RSA public key in…
fgrieu
  • 2,724
  • 1
  • 23
  • 53
5
votes
2 answers

Java Card Converter: unsupported class file format of version 50.0

I am attempting to generate a CAP file and an export file from the Wallet.java which comes standard in the Java Card SDK under the samples directory. I compile the class, use the converter and encounter the following: $ javac -g -d classes/…
cmanning
  • 225
  • 3
  • 11
5
votes
1 answer

What exactly is the class byte in JavaCard?

I've started to work with the JavaCards and trying to grasp the sense of CLA byte. If to read RFC 5.4.1 Class byte 5.4.1 Class byte According to table 8 used in conjunction with table 9, the class byte CLA of a command is used to indicate to what…
user4959035
5
votes
3 answers

Applet ID's and APDU in Java Card

In my project i want to write biometric data (like fingerprint template) on a smart card. After some good study i chose Java card for my project. But i am new to this platform and know very little about this :( I have read tutorials from Sun also,…
user268758
  • 57
  • 3
  • 8
5
votes
2 answers

Using Curve25519 on javacard

I'm looking into using curve25519 on a javacard 3.0.4 but I got stuck and I have the following questions: Does javacard 3.0.4 support such a curve? What I've tried so far was to convert the Montgomery equation to a Weierstrass equation. Doing this…
mrklr
  • 81
  • 1
  • 6
5
votes
2 answers

using java card instead of SIM in android with SEEK

I've patched android with SEEK for Galaxy S3 and after some struggle I'm now able to send APDUs to SIM card and get proper responses. I want to place my own applet inside SIM but since there is no way we can get the access to do so, I start to…
MFA
  • 537
  • 2
  • 6
  • 16
5
votes
1 answer

Restricted elliptic curves in Java Card

I am trying to implement cryptographic algorithms on elliptic curve in Java Card. First, I implemented it on 256bits elliptic curve (the NIST one) and it worked well. Now I want to test it on a 512bits curve (and not 521 like the NIST one). My card…
Raoul722
  • 1,222
  • 13
  • 30
5
votes
1 answer

Trusted source of time for JavaCard applet on SIM

I have a JavaCard applet working on Gemalto SIM card in a smartphone. I would like to create an electronic wallet with validity to a specifed date and time. I know this is impossible using a classic smartcard, which has no clock inside because of…
vojta
  • 5,591
  • 2
  • 24
  • 64
5
votes
3 answers

Programming for Java Card 3 platform in Eclipse

I've wrote programs for Java Card 2.2.2 in Eclipse using EclipseJCDE plugin and Java Card 2.2.2 Development Kit. Now I want to write programs for my smart card that is a Java Card 3.0.1 Classic Edition, but I don't have any idea how I can do…
Jean
  • 687
  • 1
  • 9
  • 25
5
votes
1 answer

Relation between Security Domain and Applet in Personalization

The Guide to Common Personalization describes the following process for Personlalization: Reset Atr Select AID to personalize initiate Secure Channel multiple Store-data commands The Secure Channel is established with the Security Domain and…
Paul Bastian
  • 2,597
  • 11
  • 26
5
votes
1 answer

How can I check INITIALIZE UPDATE and EXTERNAL AUTHENTICATE correctness?

I sent 80 50 00 00 08 00 00 00 00 00 00 00 00 [INITILIZE UPDATE Command] via opensc-tool to my java card and received 00 00 11 60 01 00 8A 79 0A F9 FF 02 00 11 79 11 36 5D 71 00 A5 A5 EC 63 BB DC 05 CC [Init Response] as its response from the…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113