An Implementation of Electronic Purses Using Atmel`s

advertisement

One of the key applications of smart cards is electronic payment via electronic purses residing on the smart cards. With an e-purse, a cardholder may purchase items from vendors who participate in the payment network, as he would with cash.

Figure 1: Typical uses of

CryptoMemory smart cards in a campus environment www.atmel.com

A T M E L A P P L I C A T I O N S J O U R N A L

An Implementation of Electronic Purses

Using Atmel’s CryptoMemory

®

Device

By: An Van Le and Anthony Kim, EFM Company

Smart cards have been widely used in several parts of the world, especially in Europe and Asia. One of the key applications of smart cards is electronic payment via electronic purses residing on the smart cards. With an e-purse, cardholders may purchase items from vendors who participate in the payment network, just as they would with cash.

Smart card applications, including those that involve electronic transactions with e-purses, have not been widely deployed in the U.S. for various reasons. However, one of the sectors where smart cards have attracted some interest is on the over

6,000 college campuses in the U.S., where smart cards are used with electronic purses for purchases and other transactions carried out at campus facilities.

accessed only after the chip authenticates a user via a password or a limited challenge-response scheme.

Recently, there has been considerable interest in deploying secure memory smart cards for use in copier payment systems, multi-housing laundry systems, parking, etc. One key reason is that the secure memory card costs significantly less than the processor-based card. When the number of deployed cards is large, the cost savings could be significant. In this article, we will discuss our implementation of e-purses on a new type of smart card chip: the Atmel CryptoMemory ® chip. The smart cards that contain these chips must coexist with the existing processor-based smart cards and must operate with the existing transaction system.

The CryptoMemory Card

The CryptoMemory card can be considered a hybrid between the secure memory card and the processor card. It embodies the properties of the secure memory card in the following ways:

• The card contains logic for managing nonvolatile memory, for controlling access to the memory, and for communicating with an external interface device (IFD).

• Since the card provides a basic set of functions, applications developers need not be concerned with developing their own card-operating system or on-chip application; they only need to use the provided functions in a secure and effective manner.

The CryptoMemory card embodies the properties of the processor card in the following ways:

Currently, in many smart card campus projects, the smart cards are based on chips with a central processing unit (CPU). These cards are often referred to as processor-based smart cards or processor cards for short. On the opposite end of the capability spectrum of smart cards are those based on chips that do not have a processor. These smart cards are commonly referred to as secure memory cards, as their main function is to store data in the nonvolatile memory on the chip. This data can be

• The card is capable of performing mutual authentication with an IFD, such as the reader, albeit the mutual authentication is implicit. This is based on an Atmel-specific challengeresponse protocol.

• The card is capable of communicating with the

IFD via the smart card T=0 protocol.

• The card contains encryption capability to protect the privacy of data exchanged between the card and a terminal.

page 41

A T M E L A P P L I C A T I O N S J O U R N A L

Security Requirements for

E-purse Applications

at the backend server, the balance amount and the transaction amount in each record will enable checkouts. To maintain privacy of the information in the event the card is lost or stolen, a terminal

EFM Company has developed a transaction system, detection of “gaps” and help determine whether a named Potentia, for conducting payment student or a vendor was attempting to cheat by transactions in campus settings. CryptoMemory cards manipulating the balance of the purse. will be integrated into Potentia. Therefore, the

Implementation and Deployment

CryptoMemory cards are subject to a set of security requirements similar to those used in the processorbased cards. These security requirements, as well as some key functional requirements of the transaction system, can be iterated as follows:

• Each CryptoMemory card must contain a unique set of keys and cryptographic variables to safeguard the system in the event of a security breach of a single card. Should the security of one card be compromised and lead to exposures of key values, other cards would not be affected. or interface device must submit an access PIN to the card for authentication before the card can provide access to the information.

Since the CryptoMemory card does not differentiate purse data from other data, we

Figure 1 illustrates various devices incorporating implemented the purses in user zones separate components of the Potentia – the transaction from cardholder’s data, such as enrollment system developed by EFM – to conduct electronic information. This separation ensures that a payments for many on-campus purchases.

terminal authorized only to access the student’s

In this system, the students are issued enrollment information would not be able to non disposable smart cards, which are based on tamper with the e-purse balance.

processor cards as well as CryptoMemory cards.

The CryptoMemory card provides independent

Each card contains one or more e-purses, dependaccess controls for reading and writing data.

ing on the card issuer. When a card is first issued to

Thus, conceptually, a straightforward implemena student, the purse(s) on the card would be empty.

tation for the e-purse can be described as fol-

A student can use a cash-to-card machine, which lows: accepts either cash or credit card from the student

• The user experience with the CryptoMemory and transfers a corresponding amount to the purse – Define the read access to the purse balance cards must be the same as that of a processor on the card. Once the purse is filled, the student can to be “free”— meaning the purse can be card. In other words, a cardholder need not be use the card to pay for various activities: printing, read without any required key or password.

aware of what type of card is being used. The copying, laundry, purchasing meals or books.

– During a debit or credit transaction, the terminals and other interface devices must be able to recognize different card types and issue the appropriate commands to the cards to carry out a requested transaction, transparent to the user.

• The CryptoMemory card must be able to verify the authenticity of terminals and other interface devices that participate in the payment system, and proceed to conduct transactions with a terminal only after it has successfully authenticated the terminal.

• The CryptoMemory card must be able to detect the replay of old data and transaction messages by hostile terminals and reject them.

• The CryptoMemory card, in conjunction with the

Since various chips in the Atmel CryptoMemory terminal reads the balance of the e-purse on family provide from 4 to 16 user memory zones, 4 to the card and subtracts or adds to it the

16 separate purses can be implemented. This is transaction amount. The terminal then, more than what is typically needed.

by way of the SAM, submits a

“Write password” in encrypted form to the

A critical component of Potentia that resides in the card for authentication before the terminal cash-to-card machines, the POS terminals, and the can write the new balance to the purse after card readers of the vending machines or the copiers a credit or debit operation. Furthermore, to is a small hardware module referred to as the prevent unauthorized modifications of the

Security Access Module (SAM). The SAM is purse balance during transmission, the new developed on an Atmel smart card chip, the balance is encrypted, and a checksum is

AT90SC3232CS. This SAM is a highly secure included to maintain integrity.

cryptographic processor where all the computations involving sensitive keys take place

This would enable any terminal to read the during debit or credit transactions. A secure module balance of the purses, but only an authorized like the SAM is needed because in order to make a terminal with a secure SAM can do transactions debit or a credit to the purse on the card, an and write the new balance to the card.

terminals, must be able to store and maintain the interfacing terminal must prepare a cryptogram or balance of the purses as well as other user-

Our purse implementation requires that purchase encrypted message (to prevent unauthorized specific data with a high level of integrity.

amounts above a predetermined amount, say modifications) and submit it to the card.

• The CryptoMemory card and other components of

$20.00, require the cardholder to submit a PIN

Another critical component of the transaction and be authenticated before the transaction can the transaction system must provide audit trails, system, but not shown here, is the transaction take place. This PIN is referred to as the via records or a log of the transactions. The server, which performs many tasks in the backend, maximum debit PIN. To meet this requirement on transaction records must be attached with a including verifying the integrity of all collected the CryptoMemory card, we write the maximum cryptographically strong electronic signature to transaction records, reconciling transaction debit PIN on the card as part of the e-purse data.

insure a high level of integrity. amounts on all terminals on a periodic or For security reasons, this PIN is stored on the

The transaction records help detect fraudulent on-demand basis, and managing all the devices card in encrypted form, using the Advanced attempts by ill-intentioned cardholders or vendors deployed within the payment system.

Encryption Standard (AES) — independent of the who sell services on the campus and participate in the

In addition to storing the e-purses, the card also stream cipher implemented on the card. At the payment network. For example, when all the start of the debit transaction, when the terminal stores information pertaining to the student transaction records for a period have been collected reads the current balance of the purse from the cardholder, such as course enrollment and library www.atmel.com

page 42

A T M E L A P P L I C A T I O N S J O U R N A L

Anthony Kim, CEO, EFM Company

Anthony Kim founded EFM Company in 2000, to provide electronic student portfolios in campus cards. Mr. Kim co-founded DA

Management, a management/consulting company, in 1997, working with several

Silicon Valley corporations. He has 10 years experience in management and finance and has served on the advisory board of Raining

Data Corporation. He graduated from Cornell

University and received the distinguished

Charles Goodwin Sands Medal.

An Van Le, CTO, EFM Company

An Van Le led the development of EFM’s

Transaction system in 2002. Prior to EFM,

Mr. Le held senior management and technical positions at leading technology companies. He holds over 25 patents, has published over 20 technical documents, and received seven IBM Invention awards.

Mr. Le holds a MS in electrical engineering/ computer science from the University of Utah.

Acknowledgements

The authors wish to express their appreciation to Bryce Hilton, who led the firmware implementation at EFM for the SAM used in our transaction system and provided useful comments for this article. We also wish to acknowledge another colleague,

Richard Luong, for his contributions to the development of the transaction server.

card, it also reads the encrypted PIN if the debit amount is above the predetermined limit. The terminal then provides the SAM with the retrieved

(encrypted) PIN as well as the PIN supplied by the cardholder. The main processing steps carried out by the SAM are as follows:

– The SAM derives an AES key unique to the chip and uses it to decrypt the encrypted PIN retrieved from the e-purse of the

CryptoMemory card. The result is the reference maximum debit PIN is available for comparison.

– The SAM compares the PIN entered by the user with the reference maximum debit PIN.

If they are equal, the SAM continues with the transaction and prepares a new balance to be written back to the card, encrypted under the stream cipher.

– If the two PIN values do not match, the SAM convey the error to the terminal, which in turn aborts the transaction and displays an appropriate message to the cardholder on the incorrect PIN.

– Use key diversification based on a set of master keys and the ID of the card to derive unique values of the cryptographic variables before injecting them onto each card. This is also to be in step with the earlier described requirement of unique key values for each card. Thus, in the worst case, if there were a weakness in the physical security of the initialization facility that enabled an adversary to intrude and intercept secret values transmitted to a number of cards, the security exposures would be confined to those cards. Needless to say, the derivation of

Before the cards are deployed, an important step is to inject the cryptographic variables — the secret seeds, initial Cryptograms, and passwords — onto the configuration zone of the cards in a secure manner during the card issuance process. The

CryptoMemory card will use these cryptographic variables subsequently as it carries out mutual authentication processes with the terminals and as it exchanges encrypted data with the terminals.

– encrypted under the keys derived from the values injected during the initialization process, the personalization process can be performed in a public setting of the campus, without any security concerns, at the time a student applies for the card.

unique values for the cryptographic variables are performed inside the secure boundary of a specialized cryptographic adapter or SAM to maintain the secret values for the set of master keys.

Utilize specialized readers and initialization equipment that prevent wire-tapping and interception of secret values written to the card during the initialization process.

When the CryptoMemory cards are shipped from the card manufacturer’s facility, the security of the cards is protected by a secret transport code. The card issuer is provided with the transport code via a protected communication channel or secure courier.

To personalize the cards as part of the process, the card issuer must submit the correct transport code to the CryptoMemory card before the cryptographic variables can be stored on the card. Currently, the data to be written to the configuration zone can only be transmitted to the card in clear form. This means that the card issuance process to inject these secret values onto the card should be performed at a highly secure facility to ensure the values transmitted to the card during this process are not intercepted. Our solution to this issue involved three steps: secret values of the cryptographic variables are injected onto the card, this process is only performed at a physically secure facility. The personalization process is where personalized data specific to a student, including the maximum debit PIN discussed earlier, is written to the card. Since the values written to the card during the personalization process can be

The security of the whole transaction system is dependent on the security of each component, how well the components are integrated into the system, and whether interactions between components are well designed. The built-in features of the

CryptoMemory card have helped enable us to meet the security and functional requirements stated earlier for e-purses. The cards coexist well with the processor cards in our transaction system.

We have found the CryptoMemory card offers a balanced trade-off between security, cost, and features. Its security features and the reasonable sizes of storage are unmatched by the secure

– Split the issuance process into two processes: an initialization process and a personalization process. The initialization process is where the memory cards from various vendors, while its functional features and low cost make it an attractive candidate to replace some of the low-end processor cards.

www.atmel.com

page 43

Download