Smart Card Guy

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

Java Card開発 - Java Card Sample Applications

Java Card Developmet Kitのサンプルアプリ

  • Java Card 3.0.x / 3.1のサンプルアプリ情報。
  • Java Card Dev Kit (3.1の場合は、Java Card Dev Kit Simulator)をダウンロードすると、「samples」フォルダにある。
  • Samplesはclassic_applets、reference_appsで構成
  • 全てのRIDはSun Microsystems Inc.の[A000000062] - [0xa0:0x0:0x0:0x0:0x62]
  • On Card InstallerのInstaller Appletは[0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01]

Samples

I. classic_applets

1. Hello World
2. Channels
  • AID
    • (applet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0xb:0x1 com.sun.jcclassic.samples.channels.AccountAccessor
    • (applet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0xb:0x2 com.sun.jcclassic.samples.channels.ConnectionManager
  • 仮想のワイヤレスデバイスがネットワークサービスへ接続すアプリ
  • 2つのAppletのInteractionのデモ
3. Service
  • AID
    • (applet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x9:0x1 com.sun.jcclassic.samples.service.Main
  • javacard.framework.service.BasicServiceのサンプル
4. Utility
  • AID
    • (applet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x03:0x01:0x0C:0x10:0x01 com.sun.jcclassic.samples.utility.BrokerApplet
  • javacard.framework.Utilのサンプル
  • 使われているUtility Methodは以下の通り
    • Util.arrayCompare
    • Util.getShort
    • Util.arrayCopyNonAtomic
    • Util.arrayFillNonAtomic
    • Util.setShort
5. Wallet
6. ObjectDeletion
7. PhotoCard
  • AID
    • (applet.opt) applet 0xA0:0x00:0x00:0x00:0x62:0x03:0x01:0x0C:0x07:0x01 com.sun.jcclassic.samples.photocard.PhotoCardApplet
  • 写真入りカード
  • PhotoCard\clientの中に4つのgifファイル(duke_magnify, duke_pencil, duke_thumbsup, duke_wave)がある。
8. RMIPurse
9. StringHandlingApp
  • AID
    • (applet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.sun.jcclassic.samples.stringapp.StringHandlingApp
    • (applet2.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x3:0x1 com.sun.jcclassic.samples.stringutilapp.StringUtilApp
10. SecureRMIPurse
  • US内部のみ。Global bundleでは利用できない。
11. SignatureMessageRecovery
12. ArrayViews Sample (JC 3.1のみ - Command Lineからの実行)
  • AID
    • (ClientApplet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0xd:0x1 com.sun.jcclassic.samples.arrayview.ClientApplet.ClientApplet
    • (ServerApplet.opt) applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0xc:0x2 com.sun.jcclassic.samples.arrayview.ServerApplet.ServerApplet
13. CertHandling Sample (JC 3.1のみ - Command Lineからの実行)

II. reference_apps

1. Biometry
2. JavaPurseCrypto
3. PurseWithLoyalty
4. Transit
  • 交通系カードサンプル。
  • US内部のみ。Global bundleでは利用できない。

サンプルアプリを理解するための情報サイト

Oracleオフィシャル

その他情報