Smart Card Guy

Smart Card / Java Card, Cyber Security, IoT Device Security, Root of Trust, 標準化等

洋書 - Java Card Technology for Smart Cards

Java Card™ Technology for Smart Cards: Architecture and Programmer's Guide (Java Series)

Java Card™ Technology for Smart Cards: Architecture and Programmer's Guide (Java Series)

感想

2000年発売の相当昔の本ではあるが、十分Java Card入門・実践用として使える。というか世の中Java Cardの本が非常に少ない・・・

Safari Online

https://www.safaribooksonline.com/library/view/java-cardtm-technology/0201703297/

目次

I. Introduction

1. From the Beginning
1.1. Smart Cards
1.2. Challenges in the Development of Smart Card Applications
1.3. Applying Java to Smart Cards
2. Smart Card Basics
2.1. Overview of Smart Cards
2.2. Basic Card Types
2.3. Smart Card Hardware
2.4. Smart Card Communication
  • CAD (Card Acceptance Device。ホスト)の種類 : Card Reader (USBなどによりコンピューターへ接続される), Terminal (それ自体がコンピューター。ATM端末など)
  • APDU(Application Protocol Data Unit) Protocal : ISO7816-4により定義。Command APDU, Response APDU。
  • CADとSmart Card間の通信はAPDU Protocolにより、必ずCADからCardへCommand APDUを発行し、CardからResponse ADPUを返す。
  • T(Transmission)PDU Protocol : ISO7816-3により定義。T=0(byte単位通信), T=1(Block単位通信)
  • ATR (Answer to Reset) : 最初にSmart Cardが起動(Readerに挿した際)されると、Smart Cardからこのメッセージが発行される。
  • C-APDU, R-APDUの4つのcases : https://smartcardguy.hatenablog.jp/entry/2019/02/22/163809
2.5. Smart Card Operating Systems
  • Smart CardのFile system : MF(Master File) - DF(Dedicated File) - EF(Elementary File)
  • Java Cardでは、直接File systemへ接続するイメージではなく、Array, Objectに格納して処理する。
  • Java Sample Code JavaPurseを参照
2.6. Smart Card Systems
2.7. Smart Card Standards and Specifications
  • ISO 7816
  • GSM
  • EMV
  • Open Platform : これは現在はGlobalPlatform
  • OpenCard Framework
  • PC/SC : PCでのSmart Card利用規格

II. Java Card Technology

3. Java Card Technology Overview
3.1. Architecture Overview
3.2. Java Card Language Subset
3.3. Java Card Virtual Machine
  • CAP file, Export file
    • CAP file : Java SEのjarファイルと同じ
    • Export file : linking, verification用、CのHeaderファイルみたいなイメージ
3.4. Java Card Installer and Off-Card Installation Program
3.5. Java Card Runtime Environment
3.6. Java Card APIs
3.7. Java Card Applets
3.8. Package and Applet Naming Convention
3.9. Applet Development Process
3.10. Applet Installation
4. Java Card Objects
4.1. Java Card Memory Model
4.2. Persistent Objects
4.3. Transient Objects
4.4. A Few Words about Object Creation and Deletion
5. Atomicity and Transactions
5.1. Atomicity
5.2. Block Data Updates in an Array
5.3. Transactions
6. Java Card Exceptions and Exception Handling
6.1. Exceptions in the java.lang Package
6.2. Java Card Exceptions
7. Java Card Applets
7.1. Applet Overview
  • JCREはsingle-thread environment。一度に1つのappletのみが実行できる。
7.2. Class javacard.framework.Applet
7.3. install Method
7.4. select Method
7.5. deselect Method
7.6. process Method
7.7. Other Methods in the Class javacard.framework.Applet
8. Working with APDUs
8.1. APDU Class
8.2. Interface ISO7816
8.3. Working with APDUs in Applets
8.4. Protocol-Specific APDU Processing
8.5. Summary
9. Applet Firewall and Object Sharing
9.1. Applet Firewall
9.2. Object Sharing across Contexts
10. Programming Cryptography
10.1. Quick Tour of Cryptography
10.2. Cryptographic Practice in Smart Card Applications
10.3. Java Card Cryptography APIs
10.4. Code Examples
11. Java Card Platform Security
11.1. Java Card Platform Security Features
11.2. Java Card Platform Security Mechanisms
11.3. Applet Security

III. Programming Guide and Tips

12. Step-by-Step Applet Development Guide
12.1. Design the Applet
12.2. Construct the Applet Code
12.3. What's the Next Step?
13. Applet Optimization
13.1. Optimizing an Applet's Overall Design
13.2. On-Card Execution Time
13.3. Method Invocations
13.4. Creating Objects in Applets
13.5. Reusing Objects
13.6. Eliminating Redundant Code
13.7. Accessing Arrays
13.8. The switch Statement versus the if-else Statement
13.9. Arithmetic Statements
13.10. Optimizing Variables in Applets
14. Working with int Data Type
14.1. 32-Bit Arithmetic Operations
14.2. Array Size and Array Index
14.3. Storing and Computing int Values
14.4. Summary

IV. Appendices

A. Java Card Language Subset
B. Java Card 2.1 Application Programming Interface