e01.org

Java Card

Java Card is a software technology that allows Java-based applications (applets) to be run securely on smart cards and more generally on similar secure small memory footprint devices which are called "secure elements" (SE). Today, a secure element is not limited to its smart cards and other removable cryptographic tokens form factors; embedded SEs soldered onto a device board and new security designs embedded into general purpose chips are also widely used. Java Card addresses this hardware fragmentation and specificities while retaining code portability brought forward by Java. Java Card is the tiniest of Java platforms targeted for embedded devices. Java Card gives the user the ability to program the devices and make them application specific. It is widely used in different markets: wireless telecommunications within SIM cards and embedded SIMs (eSIM), payment within banking cards and RFID (NFC) mobile payment and for identity cards, healthcare cards, and passports. Several IoT...

Java Card is a software technology that allows Java-based applications (applets) to be run securely on smart cards and more generally on similar secure small memory footprint devices which are called "secure elements" (SE). Today, a secure element is not limited to its smart cards and other removable cryptographic tokens form factors; embedded SEs soldered onto a device board and new security designs embedded into general purpose chips are also widely used. Java Card addresses this hardware fragmentation and specificities while retaining code portability brought forward by Java. Java Card is the tiniest of Java platforms targeted for embedded devices. Java Card gives the user the ability to program the devices and make them application specific. It is widely used in different markets: wireless telecommunications within SIM cards and embedded SIMs (eSIM), payment within banking cards and RFID (NFC) mobile payment and for identity cards, healthcare cards, and passports. Several IoT products like gateways are also using Java Card based products to secure communications with a cloud service for instance. 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 specifications by Sun Microsystems (acquired by Oracle Corporation in 2010). Many Java card products also rely on the GlobalPlatform specifications for the secure management of applications on the card (download, installation, personalization, deletion). The main design goals of the Java Card technology are portability, security and backward compatibility. package org.wikipedia.examples; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISO7816; import javacard.framework.ISOException; import javacard.framework.Util; public class HelloWorldApplet extends Applet { // INS (instruction) byte for "say hello" final static byte HELLO_INS = (byte)0x01; // AID (Application Identifier) for the applet private static final byte[] HELLO_APPLET_AID = { (byte)0xA0, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x62, (byte)0x03, (byte)0x01, (byte)0x0C, (byte)0x01 }; protected HelloWorldApplet() { register(); } public static void install(byte[] byteArray, short byteOffset, byte byteLength) { // the reference does not need to be assigned // we only need to call the constructor HelloWorldApplet app = new HelloWorldApplet(); } public void process(APDU apdu) { byte[] buffer = apdu.getBuffer(); if (selectingApplet()) { return; } byte ins = buffer[ISO7816.OFFSET_INS]; if (ins == HELLO_INS) { sendHello(apdu); } else { ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED); } } private void sendHello(APDU apdu) { byte[] buffer = apdu.getBuffer(); byte[] hello = { 'H', 'e', 'l', 'l', 'o' }; short length = (short)hello.length; Util.arrayCopyNonAtomic(hello, (short)0, buffer, (short)0, length); apdu.setOutgoingAndSend((short)0, length); } } ==External links== Java Card overview (Oracle) JavaCards-OpenSC

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Java Card". 1777949704. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1352601487

JSON record · API collection · citation policy