You are on page 1of 38

Java Card in Smart World

Minaoar Hossain Tanzil


Manager, Payment Lab
Kona Software Lab
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
Outline
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
4
Card in Action - Diners Club Card



In USA
Back in 1950s
Exclusive Access to Diners Club
Only with this Card


5
Magnetic Stripe Card
6
Communication Card
1984

France

Germany


Magnetic Stripe

Optical (holographic)

Chip Based
In Every Pocket Now
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
8
Smart Card in Todays World
Payment Systems
EMV (Europay/MasterCard/Visa -
EMVCo.)
Total 1.6 billion cards (2012 Q4)
Total 2.4 million terminals (2012
Q4)
NFC (in plastic card and/or in USIM)
Telecommunications
SIM - >5 billion (as of 2012, SIM
Alliance)
USIM (for UMTS)
M2M (Machine to Machine)
Smart City
Smart Meter
Identification
National ID
Passport

Security
- Cryptgraphy
- RSA/SHA/AES

Access Control
Health Card
Transport Card


9
Smart Meter - Smart Grid
10
Smart City - M2M
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
12
Inside Smart Card

Based on Chip Type
Based on Transmission Type
13
Smart Card Hardware Components
Memory Card Processor Card
14
Smart Card Contactless Interface
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
16
Card Operating Systems
Native Cards with single application and No OS

BasicCard OS
For Running Basic Programming Language

Multos OS (ISO/IEC 7816-4 Compliant)
Program in C
MEL (Multos Executable Language)
Hardware Independent Program Code

Java OS (ISO/IEC 7816-4 Compliant)
JCVM
Limited Java functionality and API
JCRE
17
Multi Application Management
Global Platform
18
File Management
Application Files in ADF (Application Dedicated File)
Working Files
Cross application not accessible
OS Files
Internal Files
Master Files
File Structure
Transparent (Binary)
Record Oriented
Fixed Size
Variable Size
Extractable/Sensitive
File ID (FID)
SFI (Short File ID)
Accessible from external
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
The Java Card
Card Application - the Applet
20
Architecture of Java Card
Cards - Evolution & Revolution
Smart Card in the Smart World
Smart Card Components
Smart Card Operating Systems
Java OS - the Java Card
Card Application - the Applet
22
Applet Installation
23
Applet Lifecycle through JCRE
24
Using The Java Card Applet
Methods
25
Applet Firewall
26
Context Switching and Object
Access
27
Managing Memory and Objects
When an object is created, the object and its contents
are preserved in non-volatile memory, making it
available across sessions

Unless it is made transient.

No transient keyword. To make transient, use
javacard.framework.JCSystem methods.

For object sharing there are Shared Interface Objects
(SIO)
28
Persistent Transactions
System level transaction support
JCSystem.beginTransaction()
JCSystem.commitTransaction()
JCSystem.abortTransaction()

The JCRE does not support nested transactions
29
Communicating with a Java Card
Applet
Two models for communication between a host
application and a Java Card applet
The Fundamental Message Passing Model
JCRMI Java Card Remote Method Invocation
30
APDU in Message Passing Model
31
Response Codes
32
The Java Card RMI (JCRMI) Model
A subset of the J2SE RMI distributed-object
model

Steps
1. A server application creates and makes accessible remote objects
2. A client application obtains remote references to remote objects
3. Invokes remote methods on them

In JCRMI, the Java Card applet is the server, and
the host application the client
33
Security & Crypto Packages
javacard.security.MessageDigest
javacard.security.InitializedMessageDigest
javacard.security.Signature
javacard.security.RandomData
javacard.security.KeyAgreement
javacard.security.Checksum
javacardx.crypto.Cipher

34
Java Card limitations
Packages
A package can refer to up to 128 other
packages
A fully qualified package name is limited to
255 bytes.
A package can have up to 255 classes.
Classes
A class can directly or indirectly implement
up to 15 interfaces.
A class can implement up to 128 public or
protected instance methods, and up to 128
with package visibility
35
Java Card limitations
Language Features Dynamic Class Loading, Security Manager,
Threads, Object Cloning, enhanced for loop
are not supported
Keywords native, synchronized, transient, volatile,
strictfp are not supported
Types char, double, float, long and multidimensional
arrays are not supported. int support is
optional.
Classes and
Interfaces
Java core API classes and interfaces ( java.io,
java.lang, java.util) are unsupported except
for Object and Throwable.
Exceptions Some Exception and Error subclasses are
omitted
36
New in Java Card 3
Supports three application models
Classic Applets - Backward compatibility
Extended Applets - Similar to Classic Applets, and can use all the new APIs, like
Threads, Strings, and GCF
Servlet Applications - Communication using standard HTTP/ HTTPS protocol

Java Card 3 offers full Java language support, including support for
All data types except float and double
Multiple threads
Extensive API support ( java.lang, java.util, GCF, and so on)
Direct handling of class files, with all loading and linking on card
All new Java language syntax constructs, like enums, generics, enhanced for
loops, auto boxing/unboxing, and so on
Automatic garbage collection

37
Its the Beginning of
Java Card
the most sold computer in the world
38
References
1. An Introduction to Java Card Technology by C. Enrique Ortiz
2. Runtime Environment Specification, Java Card Platform, Version 2.2.2
by Oracle
3. Virtual Machine Specification, Java Card Platform, Version 2.2.2 by
Oracle
4. Latest JAVA CARD SPECIFICATION
5. http://www.emvco.com/about_emvco.aspx?id=202
6. http://www.simalliance.org/en/news__events/press_releases/simalliance-
reports-6-increase-in-global-sim-shipm_hfb7k6r1.html
7. http://www.oracle.com/us/technologies/java/smartersmartgrid-352168.pdf
8. http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6698780
9. https://www.globalplatform.org/specificationscard.asp
10. http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-
1.aspx

You might also like