Java Card Development Kit User Guide

Java Card Development Kit User Guide

Java Card Development Kit User Guide Version 3.1.0u5 E99052-07 March 2021 Java Card Development Kit User Guide, Version 3.1.0u5 E99052-07 Copyright © 1998, 2021, Oracle and/or its affiliates. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xv Documentation Accessibility xvi Related Documents xvi Documentation and Support xvi Third-Party Web Sites xvi Conventions xvii Part I Setup, Samples and Tools 1 Introduction Java Card Platform Architecture 1-1 Java Card TCK 1-2 2 Installation Install and Setup the Java Card Development Kit Simulator 2-1 Before Installing the Java Card Development Kit Simulator 2-2 Installing the Java Card Development Kit Simulator 2-2 Confirming System Variables 2-3 Install and Setup the Java Card Development Kit Tools 2-3 Before Installing the Java Card Development Kit Tools 2-3 Installing the Java Card Development Kit Tools 2-4 Confirming System Variables 2-4 Installed Files and Directories 2-4 Eclipse Java Card Plug-in 2-5 Installing the Eclipse Plug-in 2-5 Configuring Sample_Platform and Sample_Device 2-5 Configuring the Java Card Tools Path 2-6 Uninstalling the Java Card Development Kit Simulator 2-6 iii Uninstalling the Java Card Development Kit Tools 2-7 3 Developing Java Card Applications Java Card Applet Development 3-1 Java Card Development Kit Components 3-2 Using Java Card Development Kit Tools 3-3 4 Running the Samples How to Run the Samples 4-1 Running the Samples in Eclipse 4-1 Running the Samples from the Command Line 4-3 Running the classic_applets Samples 4-3 HelloWorld Sample 4-4 Running the HelloWorld Sample in Eclipse 4-4 Running the HelloWorld Sample from the Command Line 4-5 Channels Sample 4-6 Running the Channels Sample in Eclipse 4-7 Running the Channels Sample from the Command Line 4-7 Service Sample 4-8 Running the Service Sample in Eclipse 4-8 Running the Service Sample from the Command Line 4-9 Utility Sample 4-10 Running the Utility Sample in Eclipse 4-12 Running the Utility Sample from the Command Line 4-12 Wallet Sample 4-13 Running the Wallet Sample in Eclipse 4-13 Running the Wallet Sample from the Command Line 4-14 ObjectDeletion Sample 4-15 Running the ObjectDeletion Sample in Eclipse 4-16 Running the ObjectDeletion Sample from the Command Line 4-17 PhotoCard Sample 4-19 Running the PhotoCard Sample in Eclipse 4-20 Running the PhotoCard Sample from the Command Line 4-21 RMIPurse Sample 4-22 Running the RMIPurse Sample in Eclipse 4-23 Running the RMIPurse Sample from the Command Line 4-25 StringHandlingApp Sample 4-26 Description of StringHandlingApp Applet 4-26 Description of StringUtilApp Applet 4-26 iv Description of StringHandlingLib and StringHandlingLibLocal Libraries 4-28 Running the StringHandlingApp Sample from Eclipse 4-29 Running the StringHandlingApp Sample from the Command Line 4-31 SecureRMIPurse Sample 4-31 Running the SecureRMIPurse Sample in Eclipse 4-33 Running the SecureRMIPurse Sample from the Command Line 4-33 SignatureMessageRecovery Sample 4-34 Message Recovery Order of Operations for Signing 4-35 Message Recovery Order of Operations for Verifying 4-35 Running the SignatureMessageRecovery Sample in Eclipse 4-35 Running the SignatureMessageRecovery Sample from the Command Line 4-37 ArrayViews Sample 4-38 Running the ArrayViews Sample from the Command Line 4-38 CertHandling Sample 4-39 Running the CertHandling Sample from the Command Line 4-39 Running the reference_apps Samples 4-40 Biometry Sample Application 4-40 SampleBioServer Class 4-41 SamplePasswdBioApplet Class 4-41 How the Biometric API Works 4-41 Implementation Notes 4-42 Running the Biometry Sample in Eclipse 4-43 Running the Biometry Sample from the Command Line 4-44 JavaPurse Sample Application 4-45 Running the JavaPurse Sample in Eclipse 4-45 Running the JavaPurse Sample from the Command Line 4-47 JavaPurseExtCap Sample 4-47 Running the JavaPurseExtCap Sample from the Command Line 4-47 JavaPurseCrypto Sample 4-48 Running the JavaPurseCrypto Sample in Eclipse 4-49 Running the JavaPurseCrypto Sample from the Command Line 4-50 Transit Sample 4-51 Running the Transit Sample in Eclipse 4-51 Running the Transit Sample from the Command Line 4-54 5 Converting and Exporting Java Class Files Overview of Converting and Exporting Java Class Files 5-1 Using the Converter in the Compact or Extended Format 5-1 Using the Converter for a Target Java Card Version 5-2 Using the Converter to Generate a Mask 5-3 v Setting Java Compiler Options 5-3 Running the Converter 5-3 Using Delimiters with Command Line Options 5-8 Using a Command Configuration File in Compact Mode 5-8 Using a JSON Configuration File for Converter in the Extended Mode 5-9 Handling Relative Paths 5-11 Converter JSON Configuration File Sample 5-12 Validating a JSON Configuration File 5-13 File Naming for the Converter 5-13 Input File Naming Conventions 5-13 Output File Naming Conventions 5-14 Verification of Input and Output Files 5-14 Creating a debug.msk Output File 5-15 Using Export Files 5-15 Specifying an Export Map 5-16 Viewing an Export File as Text 5-16 6 Working With CAP Files Compact CAP File and Manifest File Syntax 6-1 Sample Manifest File 6-2 Extended CAP File Manifest File Syntax 6-3 Sample Extended CAP Manifest File 6-4 Generating CAP Files From Java Card Assembly Files 6-4 Running capgen 6-5 Using a JSON Configuration File for capgen in the Extended Mode 6-5 Capgen JSON Configuration File Sample 6-6 Producing a Text Representation of a CAP File 6-7 Running capdump 6-7 7 Debugging Applications Debugger Architecture 7-1 Running the Debug Proxy from the Command Line 7-1 Debug Proxy Options 7-2 Debugging the HelloWorld Sample from the Command Line 7-3 8 Packaging and Deploying Your Application Overview of Packaging and Deploying Applications 8-1 Installer Components and Data Flow 8-1 Running scriptgen 8-2 vi Sending and Receiving

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    257 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us