Home > Store

Java Card Technology for Smart Cards: Architecture and Programmer's Guide

Register your product to gain access to bonus material or receive a coupon.

Java Card Technology for Smart Cards: Architecture and Programmer's Guide

Book

  • Your Price: $35.99
  • List Price: $44.99
  • Usually ships in 24 hours.

Description

  • Copyright 2000
  • Dimensions: 7" x 9-1/4"
  • Pages: 392
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-70329-7
  • ISBN-13: 978-0-201-70329-0

Smart cards are taking off: more than 3 billion will be in use by the end of the Year 2000. Smart card technologies and skills are in enormous demand -- especially, familiarity with Sun's Java Card API. This specification brings Java technology to smart cards, enabling card issuers to build breakthrough platform-independent solutions, run multiple applications on the same card, and respond to changing customer needs by installing applications even after a card has been issued. This book is the first complete programmer's guide and reference to the new Java Card 2.1 API. Through extensive code examples, it shows readers exactly how smart cards work -- and how to fully leverage the Java Card APIs in smart card development. Expert smart card developer and Java Card API team member Zhiqun Chen covers the entire Java Card language subset and all key programming concepts. Next, she presents a complete, integrated tutorial walking step-by-step through the creation of Java Card applets. The book also contains a thorough API reference. For all Java developers, smart card application developers, developers working with credit-card related applications, and builders of e-commerce and enterprise applications.

Sample Content

Table of Contents



Foreword.


Preface.

I. INTRODUCTION.

1. From the Beginning.

Smart Cards.

Brief History.

Benefits.

Applications.

Challenges in the Development of Smart Card Applications.

Applying Java to Smart Cards.

Benefits of Java Card Technology.

Brief History of Java Card Technology.

2. Smart Card Basics.

Overview of Smart Cards.

Basic Card Types.

Memory Cards versus Microprocessor Cards.

Contact Cards versus Contactless Cards.

Smart Card Hardware.

Smart Card Contact Points.

Smart Card Central Processing Unit.

Smart Card Coprocessors.

Smart Card Memory System.

Smart Card Communication.

Card Acceptance Device and Host Applications.

Smart Card Communication Model.

APDU Protocol.

TPDU Protocol.

ATR.

Smart Card Operating Systems.

Smart Card File Systems.

Master File.

Dedicated File.

Elementary File.

Smart Card Systems.

Smart Card Standards and Specifications.

ISO 7816 Standards.

GSM.

EMV.

Open Platform.

OpenCard Framework.

PC/SC.

II. JAVA CARD TECHNOLOGY.

3. Java Card Technology Overview.

Architecture Overview.

Java Card Language Subset.

Java Card Virtual Machine.

CAP File and Export File.

Java Card Converter.

Java Card Interpreter.

Java Card Installer and Off-Card Installation Program.

Java Card Runtime Environment.

JCRE Lifetime.

How Does the JCRE Operate during a CAD Session?

Java Card Runtime Features.

Java Card APIs.

java.lang Package.

javacard.framework Package.

javacard.security Package.

javacardx.crypto Package.

Java Card Applets.

Package and Applet Naming Convention.

Applet Development Process.

Applet Installation.

ROM Applets.

Preissuance or Postissuance Applets.

Postissuance Applet Installation.

Error Recovery during Applet Installation.

Installation Constraints.

4. Java Card Objects.

Java Card Memory Model.

Persistent Objects.

Transient Objects.

Properties of Transient Objects.

Transient Object Types.

Creating Transient Objects.

Querying Transient Objects.

A Few Words about Object Creation and Deletion.

5. Atomicity and Transactions.

Atomicity.

Block Data Updates in an Array.

Transactions.

Commit Transaction.

Abort Transaction.

Nested Transaction.

Commit Capacity.

TransactionException.

Local Variables and Transient Objects during a Transaction.

6. Java Card Exceptions and Exception Handling.

Exceptions in the java.lang Package.

Java Card Exceptions.

Java Card Exception Reason Code.

Throwing an Exception in the Java Card Platform.

ISOException.

UserException.

7. Java Card Applets.

Applet Overview.

Applet Installation and Execution.

Applet Communication.

Class javacard.framework.Applet.

install Method.

Creating Objects in the Applet's Constructor.

Registering the Applet Instance with the JCRE.

Processing the Installation Parameters.

Further Applet Initialization.

select Method.

SELECT APDU Format and Processing.

Default Applet.

deselect Method.

process Method.

Other Methods in the Class javacard.framework.Applet.

8. Working with APDUs.

APDU Class.

APDU Object.

APDU Buffer Size.

Interface ISO7816.

Working with APDUs in Applets.

Retrieve the APDU Buffer.

Examine the Command APDU Header.

Receive APDU Command Data.

Process the APDU Command and Generate the Response Data.

Return APDU Response Data.

Return the Status Word.

Protocol-Specific APDU Processing.

Method getProtocol.

Method getInBlockSize.

Method getOutBlockSize.

Method setOutgoingNoChaining.

Method getNAD.

Method waitExtension.

Summary.

9. Applet Firewall and Object Sharing.

Applet Firewall.

Contexts.

Object Ownership.

Object Access.

Transient Array and Context.

Static Fields and Methods.

Object Sharing across Contexts.

Context Switch.

JCRE Privileges.

JCRE Entry Point Objects.

Global Arrays.

Object Shareable Interface Mechanism.

10. Programming Cryptography.

Quick Tour of Cryptography.

Encryption and Decryption.

Message Digest.

Digital Signature.

Random Data.

Cryptographic Practice in Smart Card Applications.

Ensuring Application Security.

Functioning as a Secure Token.

Summary.

Java Card Cryptography APIs.

Design Principles.

Architecture.

Package Structure.

Code Examples.

Compute a Message Digest.

Build a Cryptographic Key.

Sign and Verify a Signature.

Encrypt and Decrypt Data.

Generate Random Data.

11. Java Card Platform Security.

Java Card Platform Security Features.

Java Language Security.

Additional Security Features of the Java Card Platform.

Java Card Platform Security Mechanisms.

Compile-Time Checking.

Class File Verification and Subset Checking.

CAP File and Export File Verification.

Installation Checking.

Cryptographically Enforced Chain Trust.

Runtime Security Enforcement.

Java Card Cryptographic Support.

Applet Security.

III. PROGRAMMING GUIDE AND TIPS.

12. Step-by-Step Applet Development Guide.

Design the Applet.

Specify the Functions of the Applet.

Specify AIDs for the Applet.

Define the Class Structure and Method Functions of the Applet.

Define the Interface between the Applet and Its Host Application.

Construct the Applet Code.

Wallet Applet Code.

Implement Error Checking.

What's the Next Step?

13. Applet Optimization.

Optimizing an Applet's Overall Design.

On-Card Execution Time.

Method Invocations.

Creating Objects in Applets.

Reusing Objects.

Eliminating Redundant Code.

Accessing Arrays.

The switch Statement versus the if-else Statement.

Arithmetic Statements.

Optimizing Variables in Applets.

14. Working with int Data Type.

32-Bit Arithmetic Operations.

Array Size and Array Index.

Storing and Computing int Values.

Summary.

4 Appendices.

A. Java Card Language Subset.
B. Java Card Application Programming Interface.
Glossary.
Bibliography. 0201703297T04062001

Preface

Audience for This Book

Java Card™ technology combines a subset of the Java programming language with a runtime environment optimized for smart cards and other memory-constrained devices. This book is intended for a wide technical audience with different needs of understanding Java Card technology.

First and foremost, it is written for Java Card applet developers. You will find a smart card tutorial, in-depth discussions on various Java Card features, helpful programming tips for applet development, and the reference to the Java Card APIs.

Second, this book is supplementary reading for Java Card platform implementors. It provides further discussion of many topics in the Java Card specifications and includes code examples to clarify those topics.

Third, this book is useful for technical managers or anyone who wants to gain an overall understanding of Java Card technology. In particular, the first three chapters are introductions to orient you within the technology from both a technical and marketing point of view.

Throughout this book, I assume that readers are familiar with the fundamentals of the Java language. For those who want to learn more about the Java language, the book by Arnold and Gosling is a good resource.

Organization of This Book

This book is written in a bottom-up fashion. Each chapter was a step to the next one, so it is best if you read the chapters in order.

Part 1: Introduction
  • Chapter 1 introduces smart cards and Java Card technology—history, benefits, and applications.
  • Chapter 2 discusses smart card basics as a foundation for exploring the rest of the book.
Part 2: Java Card Technology
  • Chapter 3 gives an overview of Java Card technology—the system architecture and its components.
  • Chapter 4 discusses the properties and the behavior of persistent and transient objects in the Java Card platform and how to create and use those objects.
  • Chapter 5 explains what atomicity means in the Java Card platform and how to develop an applet using transactions to protect data integrity.
  • Chapter 6 discusses exceptions in the Java Card platform and how applets throw and handle exceptions.
  • Chapter 7 explains how applets run within the JCRE and demonstrates the techniques of applet writing.
  • Chapter 8 describes the techniques of handling APDUs in an applet.
  • Chapter 9 explains the behavior of objects, exceptions, and applets under the control of the applet firewall and discusses how applets can safely share data using object sharing mechanisms.
  • Chapter 10 first introduces many important cryptographic concepts and algorithms. It then outlines the cryptographic APIs in the Java Card platform and demonstrates how to use these APIs through code examples.
  • Chapter 11 describes the security features in the Java Card platform and discusses how these security features are enforced through a variety of mechanisms. Along with the discussion, this chapter summarizes the topics covered in Part 2.
Part 3: Programming Guide and Tips
  • Chapter 12 walks you through a step-by-step process of creating a simple electronic wallet applet.
  • Chapter 13 provides a number of recommendations for optimizing applets. In many cases, a discussion is provided with the recommendation to help you understand various design trade-offs.
  • Chapter 14 discusses issues related to using the int data type when writing Java Card applets.
Part 4: Appendices
  • Appendix A describes the subset of the Java programming language that is supported in the Java Card platform.
  • Appendix B provides a comprehensive reference to the Java Card 2.1 APIs.
The Version Covered in This Book

This book is based on Java Card version 2.1, the latest release when the book was written. At the meantime, the next version 2.1.1 is underway. Version 2.1.1 will include minor enhancement updates to version 2.1. The contents and techniques covered in the book will continue to be relevant to future Java Card releases, and new things will be incorporated in future editions of this book.

Retrieving Additional Information On-line

You can get the latest on Java Card technology or the latest Java Card development kit from the Java Card web site at http://java.sun.com/products/javacard. For updated information about this book, visit http://java.sun.com/books/series/javacard.



0201703297P04062001

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020