`
`
`www.archive.org
`415.561.6767
`415.840-0391 e-fax
`
`Internet Archive
`300 Funston Avenue
`
`San Francisco, CA 94118
`
`AFFIDAVIT OF CHRISTOPHER BUTLER
`
`1. I am the Office Managerat the Internet Archive, located in San Francisco,
`California. I make this declaration of my own personal knowledge.
`2. The Internet Archive is a website that provides accessto a digital library of
`Internet sites and other cultural artifacts in digital form. Like a paperlibrary, we provide
`free access to researchers, historians, scholars, and the general public. The Internet
`Archivehas partnered with and receives support from variousinstitutions, including the
`Library of Congress.
`3. The Internet Archive has created a service known as the Wayback Machine. The
`Wayback Machine makesit possible to surf more than 450 billion pages stored in the
`Internet Archive's web archive. Visitors to the Wayback Machinecan search archives
`by URL (i.e., a website address). If archived records for a URL are available, the visitor
`will be presented with a list of available dates. The visitor may select one of those
`dates, and then begin surfing on an archived version of the Web. The links on the
`archived files, when served by the Wayback Machine,pointto other archivedfiles
`(whether HTML pagesor images).If a visitor clicks on a link on an archived page,the
`Wayback Machinewill serve the archived file with the closest available date to the page
`upon which the link appeared and was clicked.
`4. The archived data made viewable and browseable by the Wayback Machineis
`compiled using software programs knownas crawlers, which surf the Web and
`automatically store copies of webfiles, preserving thesefiles as they exist at the point of
`time of capture.
`5. The Internet Archive assigns a URL onits site to the archivedfiles in the format
`http://web.archive.org/web/[Year in yyyy][Month in mm][Day in dd][Timecode in
`hh:mm:ss]/[Archived URL]. Thus, the Internet Archive URL
`http://web.archive.org/web/19970126045828/http://www.archive.org/ would be the
`URL forthe record ofthe Internet Archive home page HTML file
`(http://www.archive.org/) archived on January 26, 1997 at 4:58 a.m. and 28 seconds
`(1997/01/26 at 04:58:28). A web browser maybeset such that a printout from it will
`display the URL of a webpagein the printout’s footer. The date assigned by the Internet
`Archive applies to the HTMLfile but not to imagefiles linked therein. Thus images that
`appear on a page maynothave been archived on the samedate as the HTMLfile.
`Likewise,if a website is designed with "frames," the date assigned by the Internet
`Archive applies to the frameset as a whole, andnotthe individual pages within each
`frame.
`6. Attached hereto as Exhibit A are true and accurate copiesof printouts ofthe
`Internet Archive's records of the HTMLfiles or PDFfiles for the URLsand the dates
`specified in the footer of the printout (HTML)or attached coversheet (PDF).
`7. I declare under penalty of perjury that the foregoing is true andcorrect.
`
`DATE: [~/18//3
`
`C____
`
`Christopher Butler
`
`PayPal Ex. 1054, p. 1
`PayPal v. IOENGINE
`
`
`
`CALIFORNIA JURAT
`
`See Attached Document.
`
`A notary public or other officer completing this
`certificate verifies only the identity of the
`individual who signed the documentto which this
`certificate is attached,and notthe truthfulness,
`
`accuracy,or validity of that document.
`
`State of California
`County of San Francisco
`
`LAUREL KARR
`:
`fornia
`Zz
`ary Public - Cali
`Sane
`5
`Eon Ae MeanFrancisco County
`’ sion # 2172222
`Coreites Nov 17,2020
`
` My Comm.
`
`
`
`
`
`Subscribed and sworn to (or affirmed) before me on
`this
`
`KG
`
`day of December
`
`, QAY , by
`
`Christopher Butler,
`
`proved to me on thebasisof satisfactory evidence to be
`the person who appeared before me.
`
`Signatur
`
`Ve —
`
`PayPal Ex. 1054, p. 2
`PayPal v. IOENGINE
`
`
`
`Exhibit A
`
`PayPal Ex. 1054, p. 3
`PayPal v. IOENGINE
`
`
`
`Smart cards: A primer - JavaWorld - December 1997
`December 1997
`JAVAWORLD
`Subscribe, it's free!
`CT ee) NEWSxviews|]Javaresources|
`Rae
`
`
`lo:
`
`Smart cards: A primer
`
`Develop on the Java platform of the future
`
`Summary
`Thisarticle, the first ina new Java Developerseries on smart cards,will introduce you to smart card howsand whys. All you need is a smart card, a
`card reader, and software that lets you communicate with the card, and you can begin developing a real-world application. This article includes: a
`package to manipulate smart cards using ISO 7816; a demonstration of how to read and write data to a memory smart card using the Gemplus reader
`and a Gemplus smart card; and a discussion of some ofthe applications that make use of smart card memory features. Futurearticles will use cards by
`different manufacturers. We'll also touch on smart card standards.
`
`With thisfirst article in the series, we will lay the groundwork for future articles with a discussion of the new and emerging standard called OpenCard.
`Future articles will deal with security cards and electronic purse cards. Finally, this article will teach you some of the basics about smart card software
`architectures. (3,500 words)
`
`
`
`Smart cards have been getting a lot of buzz lately on the Web,at the JavaOne conference last April (four sessions dealt with the technology), on the
`big network newsstations, and on CNN. Inthis article we'll bring the smart card to life with a real-world smart-card example. The techniques
`
`presentedherewillallowyoutostartbuildingJavaapplicationsthataresmart-cardenabled.
`
`We'll focus on twotypes of smart cards: memory smart cards, which can be viewed as minuscule removableread/write disks with optional security;
`
`and processor cards, which can be viewed as miniature computers with an input and outputport. Futurearticles will cover processor cards in greater —_sricieto
`depth.afriend
`
`a
`
`As the meatofthe article, we'll develop a simple prototype for reading and writing data to a smart card. We will discuss a drug prescription card,
`whichkeepsa list of all your prescriptions and tracks yourinsurance, prescription plans, and other useful info. Later articles will expand on the idea of the
`prescription card.
`
`You'll notice that a recurrent theme that runs throughoutthis series on smart cards is the need for a security frameworkto prevent rogue plug-ins, ActiveX
`components, and so on from getting at your personal and/or corporate info-goodies. To this end, the demonstration of how to read and write data to a smart card
`included in this article will provide you with persistent, secure (and portable) storage.
`
`Whatis a smart card?
`You can think of the smart card as a "credit card" with a "brain"onit, the brain being a small embedded computerchip. This card-computer can be programmed to
`perform tasks andstore information,but note that the brainis little -- meaning that the smart card's powerfalls far short of your desktop computer.
`
`Smart cards currently are used in telephone, transportation, banking,and healthcare transactions, and soon -- thanks to developers like you -- we'll begin to see them
`used in Internet applications. Smart cards are already being used extensively in Japan and Europe and are gaining popularity in the U.S. In fact, three significant
`events have occurredrecently in the smart card industry in this country:
`
`Microsoft and several other companies introduced PC/SC, a smart card application interface for communicating with smart cards from Win32-based platforms for
`personal computers. PC/SC doesnot currently support non-Win32-based systems and may never do so. Wewill discuss this in greater detail later on.
`
`OpenCard Framework
`OpenCard is an open standard that provides inter-operability of smart card applications across NCs, POS, desktops,laptops, set tops, and so on. OpenCard promises
`to provide 100% pure Java smart card applications. Smart card applications often are not pure because they communicate with an external device and/or use
`libraries on the client. (As a side note, 100% pure applications could exist without OpenCard, but withoutit, developers would be using home-growninterfaces to
`smart cards.) OpenCard also provides developers with an interface to PC/SC for use of existing devices on Win32 platfroms.
`
`JavaCard was introduced by Schlumberger and submitted as a standard by JavaSoft recently. Schlumberger has the only Java card on the market currently, and the
`companyis the first JavaCard licensee. A smart card with the potential to set the overall smart card standard, JavaCard is comprised of standard classes and APIs
`that let Java applets run directly on a standard ISO 7816 compliant card. JavaCards enable secure and chip-independent execution of different applications.
`
`Althoughthis article focuses on smart cards,it is importantto note that you are not limited to these kinds of devices. Personally, | prefer the "Ibuttons"
`device being produced by Dallas Semiconductor.It is small and portable like a credit card, but so much handier. Why? You don't have to dig out your
`wallet in search of a card; Ibuttons is right there, on yourfinger. Yes,it's a ring!
`
`While contactless versions of the smart card do exist (see below for more information on this), I think the Ibuttons, functional-jewelry type of device
`could be quite profitable. For more information on [buttons, see the Resources section. By the way, the Java Commerce Team demonstrated a
`
`PayPal Ex. 1054, p. 4
`PayPal v. IOENGINE
`
`
`
`is more reliable than a magnetic stripe card
`currently can store a hundred times more information than a magnetic stripe card
`is moredifficult to tamper with than magstripes
`can be disposable or reusable
`can perform multiple functions in a wide range of industries
`is compatible with portable electronic devices such as phones, personal digital assistants (PDAs), and PCs
`is constantly evolving (afterall, it incorporates a computer chip)
`
`Types of smart cards
`As mentioned above,this article will focus on two types of smart cards -- memory andprocess. In all, there are five types of smart cards:
`
`1. memory cards
`2. processor cards
`3. electronic purse cards
`4. security cards
`§. JavaCard
`
`Smart cards are a personal piece of hardware that must communicate with some other device to gain accessto a display device or a network. Cards can be plugged
`into a reader, commonlyreferred to as a card terminal, or they can operate using RF radio frequencies.
`
`Smart cards can communicate with a readeror receiver (see the section on readers below for more on these two terms) in one of two forms:
`
`Contact smart cards -- The connection is made whenthe reader contacts a small gold chip on the front of the card.
`
`Contactless smart cards -- These can communicate via an antenna,eliminating the need to insert and remove the card by hand. With a contactless card, all you have
`to do is get close to a receiver, and the card will begin communicating with it. Contactless cards can be used in applications in which card insertion/removal may be
`impractical or in which speed is important.
`
`Some manufacturers are making cards that function in both contact and contactless modes.
`
`Create a development environmentfor building smart card apps
`In order to develop smart card applications, you need a few things, namely: a smart card reader; software to communicate with the reader as well as some software
`to communicate with the card that has been pluggedinto the reader; and, of course, smart cards and smart-card hardware.
`Smart card reader
`To communicate with a smart card or develop an application that is smart-card capable, you must have a reader. The readerprovides a path for your application to
`send and receive commands from the card. There are many types of readers on the market, the most prevalent being the serial, PCCard, and keyboard models.
`(Keyboard models pop up here and there; expect them to be directly available from the large PC makers by June 1998.)
`
`This article uses serial readers to support the devices. A serial reader connects to a computer's serial port. Note that the code provided also supports a PCCard
`reader; most laptops come with PCCardslots built in.
`
`Each manufacturer provides a different protocol for speaking to a reader. Once you can communicate with the reader, there is one protocol for communicating with
`a smart card: Communication with a smart card is based on the APDU format. (The APDU formatis discussed below.) For information on purchasing your own
`reader, see the "Gemplus smart card readers" heading in the Resources section.
`
`Software for communicating with the reader
`A numberof object-oriented classes are needed for the smart card example included inthis article. These are:
`
`ISO commandclasses for communicating with 7816 protocol
`Classes for communicating with the reader
`Classes for converting data to a manufacturer-specific format
`Anapplication for testing and using the cards for the purpose for which the application was designed
`Smart cards and smart card hardware
`Asnotedat the beginning ofthe article, in order to develop the smart card application here, you need smart card hardware and some smart cards. You can purchase
`smart card developmentkits from a number of companies, including Gemplus and Schlumberger.
`
`Forthose of you who already have readers, you should be able to use your reader by supplying an implementationofan interface class that we will discuss later. As
`mentioned above, before we can communicate with the card, we mustbe able to communicate with the reader, and just as there are manydifferent cards, there are
`manydifferent readers.
`
`Important smart card standards
`An importantpiece of the smart card application developmentpuzzleis the standard protocols. Basically, the application communicates with the reader, which in
`turn talks to the smart card using a standardsprotocol-- in our case, the International Standards Organization (ISO) 7816 protocol.
`
`As with any new technology, there are so many standards for smart cards that you mayfind yourself discouraged and overwhelmed. Achieving a basic
`understanding of the following standards will enable you to develop applications with the confidence that you are not ignoring something basic to using smart cards.
`For some systems, however, special standards comeinto play. 1 have broken the whole standards thing downinto "horizontal" and "vertical" standards: Horizontal
`standardscan be usedbyall applications, while vertical standards are specific to a system.
`Horizontal standards
`
`ISO 7816 -- describes the lowest-level interface to a smart card.It is at this level that data bytes are transferred between card readerandcard.
`e
`https://web.archive.org/web/ 19980123 184230/http://wwwjavaworld.com:80/javaworld/jw-12-1997/jw-12-javadev.html
`
`PayPal Ex. 1054,
`PayPalv. IOENGINE
`
`PayPal Ex. 1054, p. 5
`PayPal v. IOENGINE
`
`
`
`Smart cards: A primer - JavaWorld - December 1997
`e PCYSC -- the standard for communicating with smart cards connected to Win3.1/Win95/NT machines.
`
`¢ OCF -- an all-Java interface for communicating with smart cards from a Java environment. (Soon OCFwill allow developers to write to OCF and perform
`the translation, so there'll be no need to write to PC/SC.)
`
`e JavaCard -- describes the JavaCard and whatit supports.
`Vertical standards
`
`e Mondex-- digital cash that uses smart cards only. The Mondex approach does not allow cash to exist outside of the card.
`
`¢ VisaCash-- debit card that keeps track of the cards on the server.
`¢ Proton -- another form of E-cash.
`
`© MPCOS-EMV -- general-purpose card that lets you implement your own type of currencyor token.
`
`I am always amazedthat such a small piece of plastic could require so much documentation reading and demand so much knowledgeonthe part of the developer!
`
`Because such a high level of expertise is necessary with smart cards, there is a market for developers to supply Beans-capable products that implementa vertical
`standard using the horizontal standard for the market you're lookingto sell to. This means that you could develop beans that use various combinations ofthe
`horizontal standards, like OpenCard, to implement a specific application using some other industry standard for commerce or any other application.
`
`Communicate with smart cards from a Java applet or application
`You know what you need to connectupall the hardware. Now weneedto understand how to use some APIs that will allow us to send commands from an
`application to a reader. (The reader, in turn, communicates with the card, thereby acting as the intermediary before sending the data to the card.) The smart card
`reader wiggles the gold contact points and transfers the data. The card will do something with the data and return it to the reader, which will then return the data to
`the application. So whereare all these bytes as they are moving from yourapplication to the card?
`
`As mentioned above,the application communicates with the reader, which in turn talks to the smart card using the standards discussed above.Basically, as smart
`card technology developed, a smart card standard was proposed by ISO. The standard defined mechanical andelectrical characteristics as well as the protocol for
`communicating with the card. Pointers to the relevant ISO documents are listed in the Resources section. Unfortunately, the ISO group was unable to provide a
`standard for communicating with the reader. So, in order to send a commandto a card,first you need to find the commandthatthe card supports, wrap this
`commandin an ISO commandpacket, and then wrap this new commandin the wrapperrequired for the reader in question. The example application provided here
`performs all of this layering for you.
`
`Application Protocol Data Units (APDUs)
`The basic unit of exchange with a smart card is the APDU packet. The command messagesentfrom the application layer, and the response message returned by the
`card to the application layer, are called an Application Protocol Data Units (APDU). Communication with the card and the readeris performed with APDUs. An
`APDUcan beconsidered a data packet that contains a complete instruction or a complete response from a card. To provide this functionality, APDUs have a well-
`defined structure that is defined in a numberof ISO documents belonging to the 7816 specification family.
`
`APDUsconsist of the following fields:
`
`Command APDU Format
`
`
`
`Response APDU Format
`Data
`
`swl
`
`Sw2
`
`The following are someof the classes provided for transporting APDUsandthe classes' functions:
`
`© Command-- encapsulate command APDU
`
`© Response -- encapsulate response APDU
`
`¢ 180CardReader-- specify an interface. Each device has to implementthis interface
`
`IsOCommand -- construct an ISOCommand and execute the command through the ISOCardReaderinterface
`
`Communicating with smart cards
`Sun has developed the Java Electronic Commerce Framework (JECF), an extension to the core Java platform that allows developers to easily and rapidly develop
`electronic commerceapplications. JECF provides several classes that support communication with smart cards very easily. (See the Resources section for
`information on the JECF.)
`
`The card we are working with in this article has one commandfor reading data and another commandfor writing data. This card is referred to as a GFM cardandis
`produced by GemPlus. You should be able to use other cards as long as they are ISO 7816-compliant and you have the information on what their APDU commands
`are. Of course you will also have to doalittle programing. The GFM card has memory organizedin blocks of64 bits or 8 bytes. You must carry out reads and
`writes using modulo8 arithmetic. In other words, you cannot write 1K directly as one long contiguous write. The Java code we supply here doesthis for you. Some
`of the newer cards support larger read/write sizes. So, to write the string "0123456789," you would need to issue two commands with proper indexing of the
`address. (Yes, smart cards can be very difficult to program.) As memory cards and processor cards merge, manyofthese restrictions are disappearing.
`
`In order to read the abovestring, you would then needto issue the "read" command.
`
`PayPal Ex. 1054, p. 6
`PayPal v. IOENGINE
`The two commands weare goingto use are formatted belowin terms of an APDU.In ourcase, we use the following Java methodsto read andwrite the card. The
`valuesin the table below demonstrate how to construct an APDU. Thestructure of the APDUis defined in the GFM programmer's manual.
`
`
`
`for storing data at the specified addresses. The two methods we have been discussing for communication with a GPM896 smart card are:
`TsoCommand(0, OxD0, 0, upper,
`lower, 8); // Write 6 bytes to the address
`
`IsoCommand(0, OxBO, 0, upper,
`
`lower, 8); // Read 8 bytes from the address
`
`Communicating with a smart card from a browser
`The existence of these three native interfaces indicates the lack of understanding of major corporations of developers' need to have simple APIs that they can
`remember when they are in a Java environment. If all vendors supported JNI, then at least the interface would remain constant and you would not have to spend
`hours getting the interface bindings to work.It is true that you wouldstill have to write a small amountof "native code," butthere is value in having a consistent
`interface.I havetried all three APIs above and found JNI to be more consistent than the rest, as well as the easiest to use and implement. The integration with
`HotJavais the best; with HotJava you can sign the classes thattalk to a serial port and use them securely with less hassle than with the other two browsers. Sun has
`recently announced a newinitiative to help browser companies implement new versions of the JDK/JVM.
`
`The precceding discussion revolved around how to communicate with a hardware device that does not have JDK support.In the next few articles we will stop
`concentrating on the "native interfaces" and use an industry standard API for communicating with smart cards. The standard I am choosing for communication is
`OpenCard with a PC/SC bridge. | will write my appliations to OpenCard not PC/SC. Why?
`
`Asa developer you have many choices. Although generally this is a good thing,it also can lead to increased cost and non-uniform functionality when the choices
`are APIs that do no spanall the platforms you need. So, for example, you could decide to write your smart card applications using PC/SC,which provides support
`in the Win32 world. This is a bad idea becauseif yours is a consumerapplication andit is brought up on WebTV,the screenwill flash with the message: "Wait for
`Pentium version of WebTV." Smart cards are used in markets other than Win32 desktops or CE units. So, what should you do? Write to OpenCard and distance
`yourself from the lack of consistent JNI bindings in Internet Explorer.In fact, I thinkit is a wise moveto abstractall APIs that only function on one platform.
`
`And now,the real-world application!
`It's time nowto lay out the scene for a moresignificant smart card application.In the future, when we paya visit to the doctor and he or she suggests we take a
`particular medication, we might be players in the following scenario:
`
`e The doctor asks you for yourprescription card.
`
`* The cardis inserted into the reader, and the doctor looks at yourprescription history. (For those of us with complex medical/medicationhistories, an expert
`system may be necessary.)
`:
`
`¢ The doctor notices that another doctor currently has you on a medication that may react with the drug he or she was thinking of prescribing. So the current
`doctor choosesa different drug and enters the new prescription on yourprescription smart card. (Ideally, at this point, the card could transmit the orderto the
`pharmacy.)
`
`e You take your card to the pharmacy andinsert it into the pharmacy's reader.
`
`¢ The pharmacistlooks at your prescription history and gets the new prescription.
`
`Suppose pharmacies have better data on drugs than doctors,and this particular pharmacist thinks the doctor should reconsider the prescribed drug. The
`pharmacistcalls the doctor, whose phone numberis included on the prescription smart card. After a brief discussion, the two decide on an alternate
`medication and update the card.
`
`¢ The pharmacistfills your prescription,takes the provider plan information off the card, and communicates with the plan provider using an encrypted protocol.
`
`* The medical providerverifies that you are actually a plan member, checks that the prescription comes from an authorized doctor, and takes the opportunity to
`update some data on your card.
`
`© The pharmacist asks you forfive dollars.
`
`Sounds like a safer system to me than the (primarily) paper-and-pen system in which humansare the link between disparate computer systems.In fact, in Germany,
`medical smart cards are already in use.
`
`The advantages of the prescription smart card
`So whatvalue do smart cards add to traditional prescription plan "cards"? They offer:
`
`e Access to card data when you changestores, travel, or deal with new agencies.
`
`e Instant access to medical history and medication history for ambulance or ER personnel.
`
`e Itemized records showing what you have beentaking -- including when, where, and how much.
`
`e Data upload/download to approved recipients.
`
`In orderto provide support for the above process, we need to develop an application that lets us read and write records to the card in a secure manner. The
`application above simply gives the userthe ability to enter data onto the card. For example, your doctor can add your prescription to the card.
`
`Developing the application
`Inthis section you get the code you need to write data to a smart card and read it back. Thefirst action in the program that is trying to read or write data to a
`memory card is to get a reference to a device that supports a smart card. Once we havethe device, we need to write or read the desiredstring. This is achieved by
`calling on the methods supplied in cardstrings. java. The prototype classes providedfacilitate the programming of smart cards. We've also added a Beans-style
`event handler to inform us of smart card events such as the insertion of a card. (Thanks to Dan Guinan, senior developer on the JECF,forthis lasttip.)
`https://web.archiveorg/web/19980 123 184230/http://www.javaworld.com:80/javaworld/jw-12-1997/jw-12-javadev.html
`
`PayPal Ex. 1054, p. 7
`PayPal v. IOENGINE
`
`PayPal Ex. 1054, p. 7
`PayPal v. IOENGINE
`
`
`
`Smart cards: A primer - JavaWorld - December 1997
`
`Considerthe following code fragment from Rwstring. java:
`import java.commerce.smartcards.*; Packages form JECF to support smart cards
`import java.commerce.gemplus.*;
`import java.commerce.DeviceManager.*;
`import java.awt.event.*;
`
`* Read and write Gemplus Memory cards. The following cards
`are supported:
`
`public class RWString {
`
`public static void main( String args[]) {
`WriteString wes = new WriteString(args);
`
`lass WriteString implements ActionListener {
`
`TsoCardReader
`int
`String
`
`isoReader = null;
`portNumber;
`deviceName;
`
`public WriteString(String args[]) {
`
`TELLTTTELLTTLATT TTA LLL LTA AA AL
`//
`Process the arguments
`FELTTATTLTTTLAL ALA ALAAALLAA ALAA TAAL
`{
`for(int i = 0; i < args.length;
`i++)
`if { args[i].equals("-port") ){
`portNumber = 0;
`{
`} else if ( args[i].equals("-device") )
`deviceName = new String ( args[++ti]
`} else if ( args[{i].equals("-help") )
`{
`System.out.println("“Usage: string -port # -device COMi or /dev/ttya" );
`System.exit(0);
`
`);
`
`} S
`
`martCardDetector scDetector = new SmartCardDetector(1000);
`scDetector.addActionListener(this);
`scDetector.startDetection();
`
`public void actionPerformed(ActionEvent actionEvent) {
`System.out.println("Action Performed:
`" + actionEvent
`try {
`
`);
`
`// Open the requested port number
`SmartCardReader scr = new SmartCardReader();
`isoReader =
`scr.getDefault();
`isoReader. beginCardSession(GemplusSerialReader.GFM);
`CardStrings .writeGFMString("01234567" ,
`isoReader );
`System.out.println(CardStrings.readGFMString(isoReader )
`isoReader.endCardSession();
`} catch(Exception e)
`{
`System.out.printin( “Exception " + e);
`e.printStackTrace();
`} finally {
`try {
`
`);
`
`isoReader.endCardSession( );
`} catch(Exception eFinally) {
`System.out.println("Could not power Down card perform manual reset”);
`
`}
`
`he class cardstrings provides someutility methods to read and write strings to the card. The strings are stored on the card with a length field of two bytes,
`followed by six empty bytes, followed bythe string data.
`
`Asa challenge for those of you who actually get some cards andstart programming them, you should be able to modify the methods in Cardstrings to read and
`write Java objects. This is a more flexible approach than just writing strings. If you write Java objects you can save data without worrying about its format. I wanted
`to start with something simple that everyone could relate to -- namely, storing somestring data on a card.
`
`The following application is a complete example for reading and writing data to a GemPlus GFM card using a GCR400 serial reader. Withalittle bit of work other
`readers can be supported. Don't bother doing the work for supporting other readers: Next month we'll be providing an example of how to do this with OpenCard,
`whichis quickly becomingthe standard in this area.
`package java.commerce.MemoryCards;
`
`import java.io. IOException;
`import java.commerce.smartcards.*;
`import java.commerce.gemplus.*;
`
`public class CardStrings {
`fue
`* Write a String, since the card is modulo 8 and we are
`* not using serialized objects -- the first two bytes are the
`* length followed by six spare bytes. Strings longer than 4096 - 48
`* bits will be truncated.
`
`PayPal Ex. 1054, p. 8
`PayPal v. IOENGINE
`
`
`
`wemd = new IS0Command(0, Oxd0, 0, 0, 8,0);
`womd.data.writeShort( length );
`System.out.printin("Write out the Length");
`winput = womd.execute(isoreader, new GemplusReaderFailureHandler());
`// Write the String out
`int wholeAmount = length/8;
`int remainder = length % 8;
`// Write the String out groups of 8
`{
`for ( int 1 = 1; 1 <= wholeAmount; 1l++ )
`System.out.println("Writing 8 bytes at " + (1*8));
`upper = (1 * 8 ) >> 8;
`lower = ( 1* B
`)
`& Oxff;
`wemd = new IsoCommand(0, 0xd0, upper,
`int index = (
`(1-1) * 8 );
`womd. data.writeString(s.substring( index) ,8);
`System.out.println("Write out bytes at " + index);
`winput = womd.execute(isoreader,new GemplusReaderFailureHandler());
`/ Write the remainder out
`) >> 8;
`upper = ((wholeAmount+1)
`* @
`) & Oxff;
`lower = ((wholeAmount+l)
`* 8
`wemd = new ISOCommand(0, Oxd0, upper,
`int index = ( wholeAmount * 8 );
`womd.data.writeString(s.substring( index), remainder) ;
`winput = womd.execute(isoreader,new GemplusReaderFailureHandler());
`} catch ( Exception e )
`{
`System.out.println( "Exception " + a);
`e.printStackTrace[);
`
`// Save the length
`
`// Groups of 8
`// Remainder
`
`lower, 8,0);
`
`lower, remainder,0);
`
`t/
`
`{
`
`" + length);
`
`// Groups of 8
`// Remainder
`
`}/
`
`}r
`
`eturn ( sb.toString() );
`
`}
`
`{er
`* Read a String, since the card is modulo 8 and we are
`* not using serialized objects -- the first two bytes are the
`* length followed by six spare bytes. Strings longer than 4096 - 48
`* bits will be truncated.
`*/
`public static String readGFMString(ISOCardReader isoreader }
`TsoCommand
`remd;
`IsoCardinputStream rinput;
`int upper, lower;
`short length;
`sb = new StringBuffer();
`StringBuffer
`try {
`// Read the control section
`// Read the length
`remd = new IS80Command(0, Oxb0, 0, 0, 0, 8);
`rinput = remd.execute(isoreader,new GemplusReaderFailureHandler());
`length = (short)rinput.readShort(};
`System.out.println("The length is:
`// Read the String
`int wholeAmount = length/8;
`int remainder = length % 8;
`// Read the String in groups of 8
`{
`I++ )
`for ( int 1 = 1; 1 <= wholeAmount;
`System.out.println("Reading 8 bytes at " + (1*8));
`upper = (1 * 8
`) >> 8;
`lower = (1+* 8) & Oxf£;
`lower, 0, 8)?
`remd = new ISOCommand(0, 0xb0, upper,
`rinput = romd.execute(isoreader,new GemplusReaderFailureHandler());
`sb.append ( rinput.readString(8)
`);
`System.out.println("String to this point:” + sb.toString());
`/ Read the remainder
`upper = (
`(wholeAmount+1) * 8 ) >> 4;
`lower = (
`(wholeAmount+1} * 8
`)
`& Oxff;
`remd = new [SOCommand(0, Oxb0, upper,
`lower, 0, 8);
`rinput = remd.execute(isoreader,new GemplusReaderFailureHandler());
`sb.append ( rinput.readString(remainder)
`);
`System.out.printin("String to this point:" + sb.toString());
`} catch ( Exception e )
`{
`System.out.println( "Exception " + e);
`e.printStackTrace();
`return ( null
`);
`
`}
`
`Future articles
`In future articles we will discuss ways in which our doctorof the future can securely sign the entry he or she has put on yourcard,so that the card can function as a
`valid prescription, even for in-triplicate prescriptions for controlled substances. The application mustalso support the ability to display your prescription history.
`This is a feature of an application that can be used by yourself, your pharmacist, emergency personnel,