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

Is there any way to make calculations with big (32 bits or more ) numbers in Java card 2.2.1?

I want to convert 4 byte hex number to decimal number using java card 2.2.1. E.g.: 50ef7f19 -> 1357872921 For this conversion i need to use 32 bit numbers so it is better to use the data type as integer. But i am not sure about usage of 'int' in…
Emel Uras
  • 394
  • 2
  • 13
0
votes
1 answer

How to apply padding to HMAC-MD5 result length while calculating OTP?

While generating One Time Password, i used hmac-md5 algorithm(with respect to RFC 2104) and the hmac result is 128 bits. When hmac-SHA1 algorithm is used, the result will be 160 bits. I need to apply padding to my hmac-md5 result to make 20 byte.…
Emel Uras
  • 394
  • 2
  • 13
0
votes
2 answers

Using Smartcard to enter UserID in my Java form

I am very new to Java and Smartcard programming. I have this requirement which looks simple but I am unable to find the exact resource till now. I have a JPanel form which asks for User ID. Once User ID is entered, there is a whole deal of…
rahul kumar
  • 23
  • 1
  • 5
0
votes
3 answers

How to store offline transaction data in Java Card

I am new to Java Card development. I have created a Java Card applet for online payment.. But I couldn't find way to how to do offline transactions. I need to know how to store offline data (such as the balance) in Java Card. Is there any way to use…
Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52
0
votes
0 answers

eclipse JCDE: error in running java card project

I have followed exact instructions from the link eclipse-jcde, and now I have all JCDE features in my eclipse (I'm using eclipse ver 4.3.1). I made a new java card project and added new applet file to it, but when I try to run the project it shows…
electro
  • 141
  • 4
0
votes
1 answer

Best way to store data using APDU's?

I have bunch of records in my offcard application and I want to save them all in javacard, The question is: What is the best way of transferring data to Java Card? Should I transfer all data record by record (each one with a APDU) or send all the…
Hana Bzh
  • 2,212
  • 3
  • 18
  • 38
0
votes
2 answers

How to load CAP file to java card

I am new to java card,Can you help me how to parse Aplet CAP file into the APDU, For installing this CAP file to the card suported GP2.2.
abhi294074
  • 257
  • 1
  • 3
  • 9
0
votes
1 answer

ISO7816.SW_BYTES_REMAINING_00 return 9000 status in javacard

I have a problem that confused me for couple of day. I want to send out a data with size bigger than 255 bytes from smartcard to host application. I saw a block of code in some website. this code is like bellow: private void sendData(APDU apdu) { …
Mohsen Gorgani
  • 420
  • 4
  • 18
0
votes
1 answer

JavaCard - AID not saved? array gets overwritten with the last element

I am encountering a problem when I create a Directory File. I am obviously not creating a new Object, but only the reference - just still not sure where/why! DirectoryFile[] arrayDF = new DirectoryFile[8]; now when I create a new…
achiever
  • 309
  • 1
  • 16
0
votes
1 answer

Java cardSending data recieved 6f 00 error code

I have created ECC (Elliptic curve cryptography) in jcop j3A081 card.(dual interface card).Then i have android Application which use the Android ISO dep Connection to Communicate with the java card.(Contactless interface).So First i have select the…
Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52
0
votes
2 answers

Java Card ECKey with NIST P256 Curve. How to encode a negative coefficient?

I try to use an ECKey (http://www.win.tue.nl/pinpasjc/docs/apis/jc222/javacard/security/ECKey.html) with the P-256 curve defined by NIST on a Java Card: Curve P-256 p =…
mali100
  • 15
  • 1
  • 6
0
votes
1 answer

RESET java card applet when power loss during transaction

I am new Java card development and I want to know how to handle transactions when power is lost during a transaction. I want to know is there way to reset internally when power is lost or remove java card from card terminal. In my Java card applet…
Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52
0
votes
0 answers

Send data from android device to java card error

I am new to Android NFC development.I have created android application which using ISOdep send data to java card.In my java card applet i get data from APDU command and encrypted data using RSA2048 and send back to Android application.So I am using…
Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52
0
votes
1 answer

base64 URL No Padding in java/javacard

I am looking to write an encode function in javacard (or even java would be fine) that would base 64 URL encode (where the '+' and '/' characters of standard Base64 are respectively replaced by '-' and '_') the given data with no "=" padding. Here…
0
votes
1 answer

Reset Smart Card pin having Muscle card applet

I have GemsafeXpresso 64K-FIPS smart card. I managed to load a Muscle card applet and all the musclecard functions are working finely. My question is if any user forgets his/her pin then how do I reset/change it. I have gone through MscChangePin but…
Nimish
  • 709
  • 3
  • 16