Java Card. Smartcards. Demos. . p.1/30



Similar documents
JavaCard. Java Card - old vs new

Java Card TM Open Platform for Smart Cards

Smart Cards a(s) Safety Critical Systems

Smart Card Application Development Using the Java Card Technology

Smart Card. Smart Card applications

Smart Cards and their Operating Systems

JCAT. Java Card TM. An environment for attack and test on. Serge Chaumette, Iban Hatchondo, Damien Sauveron CCCT 03 & ISAS 03

RVS Seminar Deployment and Performance Analysis of JavaCards in a Heterogenous Environment. Carolin Latze University of Berne

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Smart Card Technology Capabilities

picojava TM : A Hardware Implementation of the Java Virtual Machine

Malicious Code on Java Card Smartcards: Attacks and Countermeasures

Study of Java Card and its Application 1 Nainesh Rawani, 2 Akhil Patel

Today. Important From Last Time. Old Joke. Computer Security. Embedded Security. Trusted Computing Base

An evaluation of the Java Card environment

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

Cloud Computing. Up until now

Mobile Operating Systems. Week I

SMARTCARD SECURITY. Java Card Security. Marc Witteman. Introduction

CHAPTER 5 SMART CARD TECHNOLOGY

Introducing etoken. What is etoken?

Smart Card APDU Analysis

Java Card Protection Profile Open Configuration

Side Channel Analysis and Embedded Systems Impact and Countermeasures

MDG. MULTOS Developer's Guide. MAO-DOC-TEC-005 v MAOSCO Limited. MULTOS is a registered trademark of MULTOS Limited.

Smart Card Evolution

Smartcards and RFID. IPA Security Course Lejla Batina & Erik Poll. Digital Security University of Nijmegen

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Advances in Smartcard Security

Token User Guide. Version 1.0/ July 2013

CHANCES AND RISKS FOR SECURITY IN MULTICORE PROCESSORS

The e-payment Systems

CryptoFirewall Technology Introduction

1. Overview of the Java Language

Embedded Java & Secure Element for high security in IoT systems

jcardsim Java Card is simple!

SOSSE. Matthias Brüstle Simple Operating System for Smartcard Education. Kommunikationsnetz Franken e.v.

Smart Card Based User Authentication

PUF Physical Unclonable Functions

Restraining Execution Environments

Computer and Set of Robots

The OpenEapSmartcard platform. Pr Pascal Urien ENST Paris

Operating Systems 4 th Class

Lesson-3 CASE STUDY OF AN EMBEDDED SYSTEM FOR SMART CARD

A Survey of Electronic Signature Development in Mobile Devices

Side-Channel Monitoring of Contactless Java Cards

Evaluating Elliptic Curve Cryptography for Use on Java Card

What is a Smart Card?

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

MultiApp ID V2.1. Java Card System. Common Criteria / ISO Security Target Public version EAL5+ MultiApp ID V2.1 JCS Security Target

Strong Authentication in details

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Gemalto Mifare 1K Datasheet

Lesson 10:DESIGN PROCESS EXAMPLES Automatic Chocolate vending machine, smart card and digital camera

Penetration Testing Windows Vista TM BitLocker TM

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Hardware/Software Co-Design of a Java Virtual Machine

CSC 551: Web Programming. Spring 2004

EXPLORING SMARTCARDS: AN INDEPENDENT LOOK TO TECHNOLOGIES AND MARKET

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

Secure Network Communications FIPS Non Proprietary Security Policy

How To Understand The Architecture Of An Ulteo Virtual Desktop Server Farm

Java and Java Virtual Machine Security

Whitepaper on identity solutions for mobile devices

Using mobile phones to access Web Services in a secure way. Dan Marinescu

SecureDoc Disk Encryption Cryptographic Engine

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Chapter 3 Operating-System Structures

Performance Evaluation of Java Card Bytecodes

2 Introduction to Java. Introduction to Programming 1 1

Real-time Java Processor for Monitoring and Test

Secure Hardware PV018 Masaryk University Faculty of Informatics

Storing Encrypted Plain Text Files Using Google Android

Java Applet and Terminal Application for Financial transactions

How To Protect A Smart Card From Being Hacked

Mobile Electronic Payments

Smartcards with Webservice Interface

Smart Card Application Standard Draft

Loyalty Systems over Near Field Communication (NFC)

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents

Hardware Security Modules for Protecting Embedded Systems

Code Generation for High-Assurance Java Card Applets

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

MUSCLE Cryptographic Card Edge Definition for Java 1 Enabled Smartcards

Developing a new Protection Profile for (U)SIM UICC platforms. ICCC 2008, Korea, Jiju Septembre 2008 JP.Wary/M.Eznack/C.Loiseaux/R.

Chytré karty opět o rok dál...

Java and Real Time Storage Applications

NXP J3A081, J2A081 and J3A041 Secure Smart Card Controller Rev. 3

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

Lesson 06: Basics of Software Development (W02D2

Transcription:

. p.1/30 Java Card Smartcards Java Card Demos

Smart Cards. p.2/30

. p.3/30 Smartcards Credit-card size piece of plastic with embedded chip, for storing & processing data Standard applications bank cards SIM s in GSM mobile phones pay-tv ov-kaart...

. p.4/30 A smartcard is a miniature computer with limited resources ROM: 16-64K : OS + programmatuur EEPROM: 4-64K: persistent data storage RAM: 256 bye-4k: scratch-pad memory minimal I/O just a serial port no keyboard, screen, mouse,... External power supply & clock. Smartcards

. p.5/30 Smart refers to ability to compute. Smart vs stupid cards Stupid cards, providing only provide memory, and no processing power, namely magnetic stripe cards memory-only chip cards

. p.6/30 Why use smartcards? Smartcard can securely store and process information: data and program stored on smartcard cannot (easily) be read, copied, or alerted. NB unlike a PC! Typical application: storing sensitive information: eg. cryptographic keys, passwords, pincodes & pin counter, chipknip balance. using/changing this information: eg. de/encrypt, check pincode, change balance whilst protecting against unauthorized use.

. p.7/30 Why use smartcards? Typical use of smartcard for authentication: X sends a random challenge c to smartcard smartcard responds with f K (c), ie. c encrypted with some secret key K. X checks this result Eg. used in GSM for network to authenticate phone, and in chipknip for point-of-sale to authenticate chipknip and for chipknip to authenticate oplaadpunt. NB secret key never leaves the smartcard! observing traffic between smartcard and terminal leaks no useful information, so communication with smartcard can be over untrusted network.

. p.8/30 Why use smartcards? Smartcards typically part of the Trusted Computing Base (TCB), ie. the part of the infrastructure that we have to trust. You want your TCB to be as reliable and hence as small & simple as possible! Eg. for a telecom network operator, the GSM SIM is part of the TCB, but rest of the mobile phone is not.

. p.9/30 Smartcard limitations Primitive I/O is a limitation: eg. chipknip user has to trust the terminal, for deducting the right amount and to keep pincode secret Smart card with displays, keyboards, fingerprint detectors, etc. are being developed... Contactless smartcards rapidly getting better.

. p.10/30 Security of smartcards Smartcard is tamper-resistant and tamper-evident, to a degree, but not tamper-proof. Smart card can be attacked by for instance differential power analysis (DPA), analysis of power consumption of card fault injection, eg. temporarily dip power supply, flash light on chip chemical etching/staining to read memory contents probing to analyse traffic on bus focused ion beam to remove/deposit material on chip surface TNO-EIB in Delft are experts at this.

. p.11/30 Attacking smartcards: DPA Power analysis of smart card doing a DES encryption

Attacking smartcards: Probing. p.12/30

Attacking smartcards: Probing. p.13/30

Attacking smartcards: Staining. p.14/30

. p.15/30 Old vs new smartcards Traditional smartcard programmed in machine-code, specific to the chip one application, burnt into ROM Newer smartcards application written in high-level language compiled into byte code stored in EEPROM interpreted on card

. p.16/30 Advantages of newer smartcards cheaper development quicker time-to-market vendor-independence and Old vs new smartcards multi-application: several applications can be installed on one smartcard post-issuance download: applications can be added, updated, removed on card already issued to customer (cf. web browser)

Java Card. p.17/30

. p.18/30 Java Card Dialect of Java for programming smartcards Slimmed down due of hardware constraints not 32-bit but 16-bit arithmetic no doubles, no floats, no strings, no threads,... no / optional garbage collection very limited API plus special features due to hardware peculiarities persistent (EEPROM) vs transient (RAM) memory applet firewall transaction mechanism smartcard I/O with APDUs using ISO7816

. p.19/30 Java Card platform The Java Card platform consists of Virtual Machine (VM) for interpreting bytecodes API, providing basic classes (eg. applet and PIN) interface to OS (eg. APDU class for I/O) Partly written in Java Card, partly native code

. p.20/30 JavaCard architecture applet applet applet ROM/EEP ROM Java Virtual Machine Java Card API ROM Smart card hardware

. p.21/30 Java 2 Micro Edition (J2ME) is the bigger brother of Java Card. J2ME J2ME has a bigger memory footprint, as is intended for use in mobile phones, PDAs, set-top boxes, etc.a Eg MIDP applets that can execute on a mobile phone Lots of dedicated APIs for TV, Phone, BlueTooth,...

. p.22/30 Java Card & smartcard hardware ROM: for program code of VM, API, and pre-installed applets EEPROM for persistent data: for objects and their fields (ie. heap) and code of downloaded applets RAM for transient data: for stack and specially allocated scratchpad arrays Writing to EEPROM is slower & consumes more power than writing to RAM, and EEPROM lifetime limited to certain number of writes.

. p.23/30 Producing & installing applets Java (Card) source code A.java java compiler Java (Card) byte code A.class cap converter compressed Java Card cap file A.cap downloading

. p.24/30 Bytecode verification Bytecode verification, ensuring type-safety of code, is CRUCIAL for Java (Card) security! Due to hardware constraints, bytecode verification on smartcard is difficult/not possible. Instead, code signing is used: bytecode verification done off-card, and only digitally signed code is trusted by the platform.

. p.25/30 Java(Card) security by typing (1) Access-control, eg. no access to private fields of other objects PIN pin;... for (i=0; i++; i<4) System.out.println(pin.thePin[i]);... pin.trycounter = 9999; In fact, Java Card provides a firewall between applets, which forbids most interaction between applets.

. p.26/30 Java(Card) security by typing (2) Type-safety, eg. no forging of pointers (as in C doing pointer arithmetic with &) or accessing outside array bounds... PIN pin; byte[] a = new byte[1];... a = pin; // type error!! for (i=134; i++; i< 137)... System.out.println(a[i]); a[36] = 9999; // access outside array bounds!!

. p.27/30 Java Card API Java Card peculiarities for which the API provides support include a APDU class for communication of smartcard with terminal a transaction mechanism to cope with card tears, ie. interruptions to power supply.

. p.28/30 APDU (Low-level!) communication with smartcard via byte array buffer aka APDU, following ISO7816 Terminal sends card a command APDU CLA INS P1 P2 Lc Data Le CLA: Class byte INS: Instruction byte P1, P2: Parameters Lc: Length data block Le: Expected length response Card sends terminal a response APDU Data SW1 SW2 SW1, SW2: Status words

. p.29/30 Transactions Sudden loss of power possible at any time due to card tear, ie. pulling smartcard from reader. Transaction mechanism provides atomic updates in event of card tears (like transactions in databases). For example, in... JCSystem.beginTransaction(); x++; y++; JCSystem.endTransaction(); either both x and y are increased, or neither is.

. p.30/30 APDU format very clumsy & antiquated. Java Card 2.2 supports Remote Method Invocation (RMI) RMI means one VM (the JVM on the terminal) invokes method on another VM (the JCVM on the smartcard). RMI For Java Card, such a method invocation (incl. its parameters and any return value it produces) is translated into APDUs handled by the platform.