Java Card
   HOME

TheInfoList



OR:

Java Card is a software technology that allows
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
-based applications (
applet In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program ...
s) to be run securely on
smart card A smart card, chip card, or integrated circuit card (ICC or IC card) is a physical electronic authentication device, used to control access to a resource. It is typically a plastic credit card-sized card with an embedded integrated circuit (IC) c ...
s and more generally on similar secure small memory footprint deviceswhich 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 SIM, payment within banking cards and 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 Schlumberger Limited (), doing business as SLB, is an oilfield services company. Schlumberger has four principal executive offices located in Paris, Houston, London, and The Hague. Schlumberger is the world's largest offshore drilling comp ...
's card division which later merged with Gemplus to form
Gemalto Gemalto was an international digital security company providing software applications, secure personal devices such as smart cards and tokens, and managed services. It was formed in June 2006 by the merger of two companies, Axalto and Gemplu ...
. Java Card products are based on the specifications by
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, t ...
(later a
subsidiary A subsidiary, subsidiary company or daughter company is a company owned or controlled by another company, which is called the parent company or holding company. Two or more subsidiaries that either belong to the same parent company or having a ...
of
Oracle Corporation Oracle Corporation is an American multinational computer technology corporation headquartered in Austin, Texas. In 2020, Oracle was the third-largest software company in the world by revenue and market capitalization. The company sells da ...
). 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.


Portability

Java Card aims at defining a standard
smart card A smart card, chip card, or integrated circuit card (ICC or IC card) is a physical electronic authentication device, used to control access to a resource. It is typically a plastic credit card-sized card with an embedded integrated circuit (IC) c ...
computing environment allowing the same Java Card applet to run on different smart cards, much like a Java applet runs on different computers. As in Java, this is accomplished using the combination of a virtual machine (the Java Card Virtual Machine), and a well-defined runtime library, which largely abstracts the applet from differences between smart cards. Portability remains mitigated by issues of memory size, performance, and runtime support (e.g. for communication protocols or cryptographic algorithms).


Security

Java Card technology was originally developed for the purpose of securing sensitive information stored on
smart card A smart card, chip card, or integrated circuit card (ICC or IC card) is a physical electronic authentication device, used to control access to a resource. It is typically a plastic credit card-sized card with an embedded integrated circuit (IC) c ...
s. Security is determined by various aspects of this technology: ; Data encapsulation: Data is stored within the application, and Java Card applications are executed in an isolated environment (the Java Card VM), separate from the underlying
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
and hardware. ; Applet firewall: Unlike other Java VMs, a Java Card VM usually manages several applications, each one controlling sensitive data. Different applications are therefore separated from each other by an applet firewall which restricts and checks access of data elements of one applet to another. ; Cryptography: Commonly used symmetric key algorithms like
DES Des is a masculine given name, mostly a short form (hypocorism) of Desmond. People named Des include: People * Des Buckingham, English football manager * Des Corcoran, (1928–2004), Australian politician * Des Dillon (disambiguation), sever ...
,
Triple DES In cryptography, Triple DES (3DES or TDES), officially the Triple Data Encryption Algorithm (TDEA or Triple DEA), is a symmetric-key block cipher, which applies the DES cipher algorithm three times to each data block. The Data Encryption Standa ...
, AES, and asymmetric key algorithms such as RSA,
elliptic curve cryptography Elliptic-curve cryptography (ECC) is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. ECC allows smaller keys compared to non-EC cryptography (based on plain Galois fields) to provid ...
are supported as well as other cryptographic services like signing, key generation and key exchange. ; Applet: The applet is a state machine which processes only incoming command requests and responds by sending data or response status words back to the interface device.


Design

At the language level, Java Card is a precise subset of Java: all language constructs of Java Card exist in Java and behave identically. This goes to the point that as part of a standard build cycle, a Java Card program is compiled into a Java class file by a Java compiler; the class file is post-processed by tools specific to the Java Card platform. However, many Java language features are not supported by Java Card (in particular types char, double, float and long; the transient qualifier; enums; arrays of more than one dimension; finalization; object cloning; threads). Further, some common features of Java are not provided at runtime by many actual smart cards (in particular type int, which is the default type of a Java expression; and garbage collection of objects).


Bytecode

Java Card bytecode run by the Java Card Virtual Machine is a functional subset of Java 2 bytecode run by a standard Java Virtual Machine but with a different encoding to optimize for size. A Java Card applet thus typically uses less bytecode than the hypothetical Java applet obtained by compiling the same Java source code. This conserves memory, a necessity in resource constrained devices like smart cards. As a design tradeoff, there is no support for some Java language features (as mentioned above), and size limitations. Techniques exist for overcoming the size limitations, such as dividing the application's code into packages below the 64 
KiB The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
limit.


Library and runtime

Standard Java Card class library and runtime support differs a lot from that in Java, and the common subset is minimal. For example, the Java Security Manager class is not supported in Java Card, where security policies are implemented by the Java Card Virtual Machine; and transients (non-persistent, fast RAM variables that can be class members) are supported via a Java Card class library, while they have native language support in Java.


Specific features

The Java Card runtime and virtual machine also support features that are specific to the Java Card platform: ; Persistence: With Java Card, objects are by default stored in persistent memory (RAM is very scarce on smart cards, and it is only used for temporary or security-sensitive objects). The runtime environment as well as the bytecode have therefore been adapted to manage persistent objects. ; Atomicity: As smart cards are externally powered and rely on persistent memory, persistent updates must be atomic. The individual write operations performed by individual bytecode instructions and API methods are therefore guaranteed atomic, and the Java Card Runtime includes a limited transaction mechanism. ; Applet isolation: The Java Card firewall is a mechanism that isolates the different applets present on a card from each other. It also includes a sharing mechanism that allows an applet to explicitly make an object available to other applets.


Development

Coding techniques used in a practical Java Card program differ significantly from those used in a Java program. Still, that Java Card uses a precise subset of the Java language speeds up the learning curve, and enables using a Java environment to develop and debug a Java Card program (caveat: even if debugging occurs with Java bytecode, make sure that the class file fits the limitation of Java Card language by converting it to Java Card bytecode; and test in a real Java Card smart card early on to get an idea of the performance); further, one can run and debug both the Java Card code for the application to be embedded in a smart card, and a Java application that will be in the host using the smart card, all working jointly in the same environment.


Versions

Oracle has released several Java Card platform specifications and is providing SDK tools for application development. Usually smart card vendors implement just a subset of algorithms specified in Java Card platform target and the only way to discover what subset of specification is implemented is to test the card. * Version 3.1 (17.12.2018) **Added configurable key pair generation support, named elliptic curves support, new algorithms and operations support, additional AES modes and Chinese algorithms. *Version 3.0.5 (03.06.2015) ** Oracle SDK: Java Card Classic Development Kit 3.0.5u1 (03.06.2015) ** Added support for Diffie-Hellman modular exponentiation, Domain Data Conservation for Diffie-Hellman, Elliptic Curve and DSA keys, RSA-3072, SHA3, plain ECDSA, AES CMAC, AES CTR. * Version 3.0.4 (06.08.2011) ** Oracle SDK: Java Card Classic Development Kit 3.0.4 (06.11.2011) ** Added support for DES MAC8 ISO9797. * Version 3.0.1 (15.06.2009) ** Oracle SDK: Java Card Development Kit 3.0.3 RR (11.11.2010) ** Added support for SHA-224, SHA-2 for all signature algorithms. * Version 2.2.2 (03.2006) ** Oracle SDK: Java Card Development Kit 2.2.2 (03.2006) ** Added support for SHA-256, SHA-384, SHA-512, ISO9796-2, HMAC, Korean SEED MAC NOPAD, Korean SEED NOPAD. * Version 2.2.1 (10.2003) ** Oracle SDK: Java Card Development Kit 2.2.1 (10.2003) * Version 2.2 (11.2002) ** Added support for AES cryptography key encapsulation, CRC algorithms, Elliptic Curve Cryptography key encapsulation,Diffie-Hellman key exchange using ECC, ECC keys for binary polynomial curves and for prime integer curves, AES, ECC and RSA with variable key lengths. * Version 2.1.1 (18.05.2000) ** Oracle SDK: Java Card Development Kit 2.1.2 (05.04.2001) ** Added support for RSA without padding. * Version 2.1 (07.06.1999)


Java Card 3.0

The version 3.0 of the Java Card specification (draft released in March 2008) is separated in two editions: the ''Classic Edition'' and the ''Connected Edition''. * The ''Classic Edition'' (currently at version 3.0.5 released in June 2015) is an evolution of the Java Card Platform version 2 (which last version 2.2.2 was released in March 2006), which supports traditional card applets on resource-constrained devices such as Smart Cards. Older applets are generally compatible with newer Classic Edition devices, and applets for these newer devices can be compatible with older devices if not referring to new library functions. Smart Cards implementing Java Card Classic Edition have been security-certified by multiple vendors, and are commercially available. * The ''Connected Edition'' (currently at version 3.0.2 released in December 2009) aims to provide a new virtual machine and an enhanced execution environment with network-oriented features. Applications can be developed as classic card applets requested by
APDU In the context of smart cards, an application protocol data unit (APDU) is the communication unit between a smart card reader and a smart card. The structure of the APDU is defined by ISO/IEC 7816-4 ''Organization, security and commands for interch ...
commands or as servlets using
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
to support web-based schemes of communication (
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaS ...
,
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and enter ...
,
SOAP Soap is a salt of a fatty acid used in a variety of cleansing and lubricating products. In a domestic setting, soaps are surfactants usually used for washing, bathing, and other types of housekeeping. In industrial settings, soaps are us ...
...) with the card. The runtime uses a subset of the Java (1.)6 bytecode, without Floating Point; it supports volatile objects (
garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
), multithreading, inter-application communications facilities, persistence, transactions, card management facilities ... As of 2021, there has been little adoption in commercially available Smart Cards, so much that reference to Java Card (including in the present Wikipedia page) often implicitly excludes the ''Connected Edition''.


Java Card 3.1

Java Card 3.1 is the latest Release of the Java Card Platform Specification and Development Kit (Released in January 2019).


New CAP file Format and Applet Deployment Model

* Applet functionality can be split into multiple Java packages * CAP file sizes can exceed 64KB


New I/O Framework and Trusted Peripherals

* A variety of physical layers and application protocol is supported, beyond smart card protocols defined in
ISO 7816 ISO/IEC 7816 is an international standard related to electronic identification cards with contacts, especially smart cards, and more recently, contactless mobile devices, managed jointly by the International Organization for Standardization (ISO) ...
* Logical access to device peripherals by secure element applications is facilitated


Core Platform Enhancements

* Array Views (views on a subset of an array), Static Resources embedded within a CAP file and Improved API extensibility


Security Services

* Certificate API, Key Derivation API, Monotonic Counter API, System Time API


New Cryptographic Extensions

* Configurable Key Pair generation, Named Elliptic Curves like Edwards-Curves, Additional AES modes ( CFB & XTS), Chinese Algorithms (SM2 - SM3 - SM4)


See also

*
Java Card OpenPlatform {{Infobox OS , name = Java Card OpenPlatform , logo = , screenshot = , caption = , developer = IBM, > 2007 NXP , source_model = , kernel_type ...


References


External links


Java Card overview
(Oracle) *
JavaCards-OpenSC
* {{Java (Sun) Java device platform Smart cards