Datasheet

AVAILABLE
1 of 23 011002
1.0 Introduction
The purpose of this document is to familiarize 1-Wire
®
software developers with the APIs for producing
secure SHA applications. There is an API available in both of the major development kits: the 1-Wire
API for Java™ and the 1-Wire Public Domain Kit. This document should serve as both a tutorial for
designing new secure applications with each API, as well as a walkthrough for a deeper understanding of
the demo applications shipped with each development kit.
This document assumes a basic understanding of the SHA iButton
®
hardware as well as the 1-Wire
protocol for using iButtons. The data sheet for the DS1963S (SHA iButton) is available on the website
(www.maxim-ic.com). Also, there are application notes available that detail the structure of a signed
certificate for eCash systems [AN151, Maxim Digital Monetary Certificates], a high-level protocol for
secure applications [AN157, SHA iButton API Overview], a SHA-1 overview [AN1201, 1-Wire
SHA-1 Overview], and the implementation of a file system for memory devices [AN114, 1-Wire
File Structure].
In any monetary SHA application, the two major components are the coprocessor and the user token. The
coprocessor is a DS1963S initialized for verifying a user token as a member of the system and validating
the user’s certificate. A user’s token is a DS1963S (or comparable 1-Wire device) that carries a monetary
certificate and identifies a user of the system. For each API, this document will give an overview of the
methods used for initializing the coprocessor, initializing the user token, and performing transactions.
Each transaction can be broken down to further steps, which could include authenticating the user,
verifying the transaction data, and updating the transaction data with dynamic information.
For all the code samples in this document, the code boxes with the light gray shading indicate that the
code is the breakdown of a higher-level task to the most detailed of operations. In the 1-Wire API for
Java, this low-level code will use the OneWireContainer18 class. In the Public Domain Kit, it will use
functions from the SHA18.C module.
2.0 SHA Applications with the 1-Wire API for Java
The solution for SHA Applications in the 1-Wire API for Java introduces a new package into the
development kit: com.dalsemi.onewire.application.sha. A snapshot of the classes in that package, as well
as their inheritance relationships, is shown in Figure 1. When detailing the nature of the necessary
methods introduced in that package, the container-level methods will be considered atomic and no further
breakdown will be provided (although the source is available in the kit).
The SHATransaction abstract superclass is meant to represent all secure transactions. This class defines
three key methods, which represent the fundamental steps in a typical transaction:
1) Verify that the user token is a valid member of the system (verifyUser)
2) Verify that the data is properly certified and has not been tampered with (verifyTransactionData)
3) Update the data as necessary and ensure the token receives the update (executeTransaction)
A
pplication Note 156
DS1963S SHA 1-Wire API Users Guide
1-Wire and iButton are registered trademarks of Dallas Semiconductor.
Java is a trademark of Sun Microsystems.

Summary of content (23 pages)