This package is obsolete. It has been replaced by the Sectok (SECure TOKen) Library and Applications. Applications: citi-apps.tar.gz copyright © 1997, 1998, 1999, 2000 permission is granted to use, copy, create derivative works and redistribute this software and such derivative works for any purpose, so long as the name of the university of michigan is not used in any advertising or publicity pertaining to the use or distribution of this software without specific, written prior authorization. if the above copyright notice or any other identification of the university of michigan is included in any copy of any portion of this software, then the disclaimer below must also be included. this software is provided as is, without representation from the university of michigan as to its fitness for any purpose, and without warranty by the university of michigan of any kind, either express or implied, including without limitation the implied warranties of merchantability and fitness for a particular purpose. the regents of the university of michigan shall not be liable for any damages, including special, indirect, incidental, or consequential damages, with respect to any claim arising out of or in connection with the use of the software, even if it has been or is hereafter advised of the possibility of such damages. This is a set of applications and a package of routines for talking to ISO 7816 smart cards. The application run on Unix (linux and bsd) and PalmOS. The applications require the sc7816 library and at least one card reader driver. The library makes use of drivers that are dynamically loaded and export the IFD interface used by MUSCLE pc/sc. We supply a driver for the Todos Argos Mini reader, or you can get more drivers from the MUSCLE web site. For a working reader and driver for the Palm, see the Palmreader. The applications include: 'atr' parses a card atr and displays protocol parameters. 'balance' checks the balance on a Payflex, Mondex, or Visacash card. 'pay' is used to send commands to a smartcard. 'lewis' is like 'pay' but for Palm. 'decard' aka the reaper extracts personal info from a Cardtech card and adds it to your Palm address book. 'secb' encrypts address book entries on the Palm. 'dogg' makes a trace of a smartcard transaction. You need a card extender to use 'dogg'. 'compost' translates the output of 'dogg' to a more readable form. For more information about smartcard research at the University of Michigan CITI, see our web page at http://www.citi.umich.edu/projects/smartcard/. Jim Rees <rees@umich.edu> ---------------------------------------------------------------------------- int scopen(int ttyn, int flags, int *ep); Open a connection to a smart card via serial port number 'ttyn'. Ports are numbered from 0, which corresponds to /dev/tty00 on unix. Use flag SCODSR if your reader, like ours, uses DSR to indicate that a card is present, else use SCODCD. 'ep' points to an int in which an error code is returned (see scrw.h). Returns an fd or -1 on error. ---------------------------------------------------------------------------- int screset(int fd, char *atr, int *ep); Reset the card and return the ATR in the buffer pointed to by 'atr' if non-NULL. 'ep' points to an int in which an error code is returned (see scrw.h). ---------------------------------------------------------------------------- int scclose(int fd); Close a connection to a smart card, and reset the port parameters. ---------------------------------------------------------------------------- int scread(int fd, int cla, int ins, int p1, int p2, int p3, char *buf, int *sw1p, int *sw2p); Issue an "OUT" command to a smart card and read the resulting data. cla: application class ins: instruction code p1, p2: per 7816-3 or application dependent p3: length of data buf: return data read from card sw1p, sw2p: pointers to ints in which SW1 and SW2 are returned Returns the number of bytes actually read, or -1 on error. ---------------------------------------------------------------------------- int scwrite(int fd, int cla, int ins, int p1, int p2, int p3, char *buf, int *sw1p, int *sw2p); Issue an "IN" command to a smart card and write some data. cla: application class ins: instruction code p1, p2: per 7816-3 or application dependent p3: length of data buf: data to write to card sw1p, sw2p: pointers to ints in which SW1 and SW2 are returned Returns the number of bytes actually written, or -1 on error. ---------------------------------------------------------------------------- int sccardpresent(int fd); Find out whether a card is present. How to do performance evaluation with the sc7816 libraryOct., 2000, Naomaru Itoi (itoi@eecs.umich.edu)
|