Programming Smart Cards Rajnish Kumar Comp527.. Expect to learn Cardlet Development Installation Coke Machine Interface Implementation Basic Cryptography.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Java Card Programming: Overview Presented by: Raman Sharykin PISCES Group: Soumyadeb Mitra, Sruthi Bandhakavi, Ragib Hasan, Raman Sharikyn University.
Security of JavaCard smart card applets Erik Poll University of Nijmegen
Professional Toolkit V2.0 C:\Presentations - SmartCafe_Prof_V2.0 - bsc page 1 Professional Toolkit 2.0.
Identity and Access IDPrime MD 8840 and IDCore 8030 MicroSD cards
Java Card Technology Ch07: Applet Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Computer Science & Engineering.
ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
FIT3105 Smart card based authentication and identity management Lecture 4.
Jason Javacards as secure objects network by Richard Brinkman.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
1 Introduction to Java and Applet. 2 Download Java Compiler (1)
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
University of Nijmegen Jaap-Henk Hoepman Department of Computer Science University of Nijmegen, the Netherlands Secure.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
Femto Java Developing Java applications for tiny footprint platforms Eduard de Jong QC Technology B.V. BOF 2187
1 Software Testing and Quality Assurance Lecture 31 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
Muhammad Wasim Raad1 Smart Cards Operating Systems أنظمة التشغيل للبطاقات الذكية By: Dr Muhammad Wasim Raad Computer Engineering Department.
SMARTCARDS. What we’ll cover: How does the Smart Card work (layout and operating system)? Security issues for the card holder The present and future of.
Java Card Technology Ch02: Smart card Basics Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Computer Science &
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
Intro to Java The Java Virtual Machine. What is the JVM  a software emulation of a hypothetical computing machine that runs Java bytecodes (Java compiler.
Java Card Open Platform Combines tomorrow's technology and platforms C:\Presentations - JavaCard_OpenPlatform.ppt - bsc page 1 Programming.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Programming Languages and Paradigms Object-Oriented Programming.
Epayment System using Java April, Computer Security and Electronic Payment System Cho won chul Kim Hee Dae Lee Jung Hwan Yoon Won Jung.
UNDER THE HOOD: THE JAVA VIRTUAL MACHINE Lecture 24 – CS2110 – Fall 2009.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: BL01A - Java & Global Platform Applet Development.
Fayoum University Faculty of Engineering Electrical Engineering Department E-voting system Using Smart Card Under the supervision Of: Dr. Magdy Amer.
Security in Java Sunesh Kumra S
Jean T. Anderson Apache Derby Security Jean T. Anderson
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Lecture 10 : Introduction to Java Virtual Machine
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Global Platform Presentation C:\Path - filename - san page 1 Open Platform on Java Card Introduction by Ingeborg Sandow.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
JAVA Java is a programming language and computing platform first released by Sun Microsystems in It was first developed by James Gosling at Sun Microsystems,
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
Java Card Technology Ch09: Applet Firewall and Object Sharing Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Computer.
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
1 Schlumberger SIM Toolkit in GSM Wilson Cheung Schlumberger Technologies (Asia) Ltd. SIM Toolkit in GSM Wilson Cheung Schlumberger Technologies (Asia)
Middleware for Secure Environments Presented by Kemal Altıntaş Hümeyra Topcu-Altıntaş Osman Şen.
SSL/TLS How to send your credit card number securely over the internet.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Jaas Introduction. Outline l General overview of Java security Java 2 security model How is security maintained by Java and JVM? How can a programmer.
Pengantar OOP Class-Java. 2 Software Development Tools Using Sun Java SDK alone Source File(s) (.java) Programmer Compiler (javac) Class File(s) (.class)
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
Java Card Technology Ch08: Working with APDUs
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
TPR 3211 Project 1 Project Title: AES in Javacard Project ID: 221 Supervisor: Mr. Safi Uddin Moderator: Mr. Murugadoss.
بسم الله الرحمن الرحيم MEMORY AND I/O.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
LonWorks Introduction Hwayoung Chae.
JAVA CARD Presented by: MAYA RAJ U C A S,PATHANAMTHITTA.
RealTimeSystems Lab Jong-Koo, Lim
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction to Microprocessor Cards 하남수
1. Presentation Agenda  Identify Java Card Technology  Identify Elements of Java Card applications  Communicating with a Java Card Applet  Java Card.
PV204 Security technologies
Before You Begin Nahla Abuel-ola /WIT.
Key Ideas from day 1 slides
Presentation transcript:

Programming Smart Cards Rajnish Kumar Comp527.

Expect to learn Cardlet Development Installation Coke Machine Interface Implementation Basic Cryptography

Smart Cards A Card with built-in micro-processor and memory. Applications : Pre-paid calling card Security needs e-cash

Terminology Program Applet Application Cardlet Instance of Program Unique AID APDU Communication format between card and terminal

Java Card Architecture Loader Application Cardlets Javacard API SOLO virtual Machine APDU MgmtFileSystemCrypto Utilities Chip Dependent Functions

Developing a Cardlet Develop a.java file -Use the packages provided -Javacard.framework -Javacardx.cryptography -Use “-g” to compile - javac –g wallet.java 1. Compile to.class

Developing a Cardlet Develop a.java file 1. Compile to.class Create a.bin file 2. Use MakeSOLO tool to generate.bin file from.class

Developing a Cardlet Develop a.java file 1. Compile to.class Create a.bin file 2. Use CardletManager tool to download.bin file to the card. Download as a program file 3.

Develop a.java file 1. Compile to.class Create a.bin file 2. Instantiate the program Assign AID Download as a program file 3. Install as a Cardlet 4. Developing a Cardlet

Methods required for Cardlet install() : instantiate cardlet object select() : prepare the cardlet for execution process() : switch statement Optional : main() : entry point for cardlet

Javacard.framework AID - Application ID APDU - Handling communication buffer ISO - constants OwnerPin Applet Util - array functions

Beware !! Card resource limitations Total cardlet size : 13.5 kb Limited heap and stack size Operation time out Desynchronization

Writing Terminal Application

Java Card’s native commands Hosted by Loader utility Loader acts as native OS Loader’s function : Conduct transaction between terminal and cardlet Provide cryptography support Manage card’s files, program files and cardlets.

Example Commands CreateFile DeleteFile SelectFile ReadBinary UpadteBinary VerifyCHV VerifyKey

Terminal Application Use slb.iop.* classes to write terminal application in Java Example method : SmartCard.sendCardAPDU( CLA, INS, P1,P2, dataArray, Mode )

Command format (APDU) CLA : Command Class ( 1byte ) 00h for loader class ( Card specific ). 03h for Wallet ( User defined ) CLAINSP1P2P3 From Terminal SW1 SW2 From Card, To Terminal Data

Command format INS : Command Instruction Identifier (1b) CLA + INS uniquely identifies the command If native, loader process Else, forwarded to suitable cardlet 03h for getBalance(). CLAINSP1P2P3 From Terminal SW1 SW2 From Card, To Terminal Data

Command format P1,P2 : Command parameters P3 : number of bytes of data to follow, or expected by the terminal SW1,SW2 : status words. CLAINSP1P2P3 From Terminal SW1 SW2 From Card, To Terminal Data

Cryptography Support

Symmetric/Asymmetric Authentication Internal/External Authentication Key Files Supported Encryption Algorithms: DES 3-DES RSA

Key Files Key FileFile IDDetails CHV1 CHV Card holder verification PIN, unblocking PIN, attempts Ext Key file0011Contains DES/3DES keys for external authentication, transport key Int Key file0001DES/3DES keys for internal authentication, MAC RSA-PRI RSA-PUB Private key Public key

External Authentication 1. Terminal calls AskRandom. Card has to return a challenge (random number ). 2. Terminal encrypts the challenge. Sends the encrypted challenge back to card using ExternalAuth. Key ID is also specified. 3. Card checks the correctness of terminal response, and authenticates if correct.

Internal Authentication 1. Call an InternalAuth command 2. Call getResponse to get the cryptogram 3. Check if cryptogram is correct. CLA INS P1 P2 P3 Mode 00/F0 88 algo_ID key_nb length S/R

Javacardx.crypto Classes DES_Key DES3_Key RSA_PrivateKey RSA_PublicKey MessageDigest

En/Decryption DES_Key class methods encryptECB, encryptCBC decryptECB, decryptCBC generateMAC, verifyMAC setKey getBlockSize

Code Walk Through

Reference SDK Guide Cyberflex Access Programmer’s Guide Search google for Java cryptography