- Aktuell

- Suche

- Kontakt

Programmieren von Java Smartcards WS 2008/09

Dozent(in): Dr. Kurt Stenzel, Matthias Güdemann, Nina Moebius
Termin: Vorlesung: Fr, 14:00-15:30 (erste Vorlesung am 17.10.)
Gebäude/Raum: Vorlesung: Raum 2002 T (Physik Hörsaalzentrum)
Ansprechpartner: Matthias Güdemann

Downloads:

Überblick

Der Lehrstuhl Softwaretechnik und Programmiersprachen bietet im WS 2008/09 die Veranstaltung "Programmieren von Java Smartcards" (integrierte V + Ü) an.


Smartcards (Chipkarten mit einem Prozessor) erhalten immer größere Verbreitung - aktuell sind mehrere Milliarden weltweit im Einsatz. Sie sind flexibler und sicherer als Karten mit Magnetstreifen und erobern sich einen riesigen Zukunftsmarkt von Anwendungen. Der neueste Trend geht in Richtung multi-applikativer Karten, die mehrere `Anwendungen' enthalten, und auf die dynamisch neue Anwendungen geladen werden können. Beispiele hierfür sind digitale Unterschrift, elektronische Geldbörse, intelligente Tickets, Loyalty Cards etc. Die Veranstaltung bietet einen Einstieg in die neueste Chipkartentechnologie. Für die Programmierung wird die Sprache JavaCard verwendet, die eine Teilmenge von Java ist. Da eine Chipkarte nur sehr beschränkte Ressourcen hat, ist das Einsparen von Speicherplatz oberstes Gebot. Neben der korrekten Programmierung ist das richtige Design der Kommunikationsprotokolle (zum Schutz vor Hackern, dem Verlust von Daten usw.) mindestens genauso wichtig. Die Veranstaltung ist eine integrierte Vorlesung und Übung. In dem Vorlesungsteil werden Kenntnisse in JavaCard, der Chipkartentechnologie, dem Design der Anwendungsprotokolle und in kryptographischen Methoden vermittelt. In dem praktischen Teil wird am Rechner (und Chipkartenleser) in Zweiergruppen mehrere JavaCard Anwendungen erstellt (als größte Anwendung eine elektronische Bahnfahrkarten, die es in dieser Form noch nicht gibt). Dabei müssen die Protokolle spezifiziert und die Chipkarte sowie die Terminals mit GUI programmiert werden. Als Chipkarten werden Java SmartCards von Giesecke & Devrient eingesetzt, die 64 K EEPROM, 3DES und 1024 Bit RSA bieten.

Organisatorisches

Vorkenntnisse:

  • Unbedingt erforderlich: Programmierkenntnisse in Java, Software-Engineering (Info II, Sopra, Softwaretechnik)
  • Nicht erforderlich: Kenntnis kryptographischer Protokolle

Wert: 8 Leistungspunkte

Scheinerwerb: Erfolgreiche Teilnahme an den Übungen, Hausarbeit, Abschlußprüfung

Termine:
  • Vorlesung: Freitag, 14:00 - 15:30 Uhr, 2002 T (Physik Hörsaalzentrum)
  • Übungen: Donnerstag, 8.15 - 9.45 Uhr, 10.00 - 11.30 Uhr, 14.00 - 15.30 Uhr, 15.45 - 17.15 Uhr,  1006 L1

Aufgaben:

 

Links

ISO Statusworte

Diese Liste enthält die JavaCard-Definitionen des ISO-Standard. Folgende Liste wird im javacard.framework.ISO7816 definiert:

90 00 No Error SW_NO_ERROR
61 00 Response bytes remaining SW_BYTES_REMAINING_00
67 00 Wrong length SW_WRONG_LENGTH
69 82 Security condition not satisfied SW_SECURITY_STATUS_NOT_SATISFIED
69 83 File invalid SW_FILE_INVALID
69 84 Data invalid SW_DATA_INVALID
69 85 Conditions of use not satisfied SW_CONDITIONS_NOT_SATISFIED
69 86 Command not allowed SW_COMMAND_NOT_ALLOWED
69 99 Applet selection failed SW_APPLET_SELECT_FAILED
6A 80 Wrong data SW_WRONG_DATA
6A 81 Function not supported SW_FUNC_NOT_SUPPORTED
6A 82 File not found SW_FILE_NOT_FOUND
6A 83 Record not found SW_RECORD_NOT_FOUND
6A 84 Not enough memory space in the file SW_FILE_FULL
6A 86 Incorrect parameters (P1,P2) SW_INCORRECT_P1P2
6B 00 Incorrect parameters (P1,P2) SW_WRONG_P1P2
6C 00 Correct Expected Length (Le) SW_CORRECT_LENGTH_00
6D 00 INS value not supported SW_INS_NOT_SUPPORTED
6E 00 CLA value not supported SW_CLA_NOT_SUPPORTED
6F 00 No precise diagnosis SW_UNKNOWN

Weitere Definitionen für APDUs in javacard.framework.ISO7816

CLA_ISO7816 0 Class-byte für ISO-konforme APDUs
INS_EXTERNAL_AUTHENTICATE 0x82 Instruction für das external_authenticate Kommando
INS_SELECT 0xA4 Instruction für das select Kommando
OFFSET_CLA 0 Index in den APDU-Buffer für das Class-Byte
OFFSET_INS 1 Index in den APDU-Buffer für das Instruction-Byte
OFFSET_P1 2 Index in den APDU-Buffer für Parameter 1
OFFSET_P2 3 Index in den APDU-Buffer für Parameter 2
OFFSET_LC 4 Index in den APDU-Buffer für Lc bzw. Le-Byte
OFFSET_CDATA 5 Index in den APDU-Buffer wo die eigentlichen Daten beginnen

Spezielle Statusworte des GemXpresso Pro R3 Cardmanagers. Folgende (spezifische) Statusworte könnte der Cardmanager bzw. die Java virtuelle Maschine noch zurückliefern:

61 XX Normal processing, XX number of bytes still available
62 83 Selected applet blocked
63 00 Cryptogram not verified
63 10 More data available
65 81 Memory failure
67 00 Incorrect length
69 82 Security status not satisfied
69 85 Command conditions not satified
69 99 Command failed and no more applets are selected
6A 80 Incorrect data: unknown criteria or incorrect AID length
6A 81 Function not supported
6A 82 Applet not found in the selected application
6A 84 Insufficient memory
6A 86 Incorrect P1, P2
6A 88 No element matches the search criteria
6B 00 Incorrect P1 or P2 parameter
6C XX Only XX bytes of data are available
6D 00 Unknown instruction code
6E 00 Incorrect instruction class
6F 00 No specific diagnosis (Exception im Applet)
6F 80 Stack Overflow (?)
90 00 Command processed without error
92 40 Memory problem
94 02 Acess out of range
94 84 Algorithm not supported
94 85 Invalid key check value
9F XX XX bytes of data available

 

PC/SC Fehlercodes:

0x00000000 SCARD_S_SUCCESS No error was encountered.
0x80100001 SCARD_F_INTERNAL_ERROR An internal consistency check failed.
0x80100002 SCARD_E_CANCELLED The action was cancelled by an SCardCancel request.
0x80100003 SCARD_E_INVALID_HANDLE The supplied handle was invalid.
0x80100004 SCARD_E_INVALID_PARAMETER One or more of the supplied parameters' could not be properly interpreted.
0x80100005 SCARD_E_INVALID_TARGET Configuration startup information is missing or invalid.
0x80100006 SCARD_E_NO_MEMORY Not enough memory available to complete this command.
0x80100007 SCARD_F_WAITED_TOO_LONG An internal consistency timer has expired. You'll probably have to restart the Resource Manager.
0x80100008 SCARD_E_INSUFFICIENT_BUFFER The data buffer to receive returned data is too small for the returned data.
0x80100009 SCARD_E_UNKNOWN_READER The specified IFD name is not recognized.
0x8010000A SCARD_E_TIMEOUT The user-specified timeout value has expired.
0x8010000B SCARD_E_SHARING_VIOLATION The ICC cannot be accessed because of other connections outstanding.
0x8010000C SCARD_E_NO_SMARTCARD The operation requires an ICC, but no ICC is currently in the device.
0x8010000D SCARD_E_UNKNOWN_CARD The specified ICC name is not recognized.
0x8010000E SCARD_E_CANT_DISPOSE The system could not dispose of the media in the requested manner.
0x8010000F SCARD_E_PROTO_MISMATCH The requested protocols are incompatible with the protocol currently in use with the card. (not in spec)
0x80100010 SCARD_E_NOT_READY The reader or card is not ready to accept commands. (not in spec)
0x80100011 SCARD_E_INVALID_VALUE One or more of the supplied parameters' values is not valid.
0x80100012 SCARD_E_SYSTEM_CANCELLED The action was cancelled by the system, presumably to log off or shut down.
0x80100013 SCARD_F_COMM_ERROR An internal communications error has been detected.
0x80100014 SCARD_F_UNKNOWN_ERROR An internal error has been detected, but the source is unknown.
0x80100015 SCARD_E_INVALID_ATR An ATR obtained from the configuration store is not a valid ATR string.
0x80100016 SCARD_E_NOT_TRANSACTED An attempt was made to end a non-existent transaction.
0x80100017 SCARD_E_READER_UNAVAILABLE The specified IFD is not currently available for use.
0x80100019 SCARD_E_PCI_TOO_SMALL The PCI receive buffer was too small. (not in spec)
0x8010001A SCARD_E_READER_UNSUPPORTED The reader driver does not meet minimal requirements for support. (not in spec)
0x8010001B SCARD_E_DUPLICATE_READER The reader driver did not produce a unique reader name. (not in spec)
0x8010001C SCARD_E_CARD_UNSUPPORTED The smart card does not meet minimal requirements for support. (not in spec)
0x8010001D SCARD_E_NO_SERVICE The smart card resource manager is not running. (not in spec)
0x8010001E SCARD_E_SERVICE_STOPPED The smart card resource manager has shut down. (not in spec)
0x8010001F SCARD_E_UNSUPPORTED_FEATURE Feature not supported by this card.
0x80100065 SCARD_W_UNSUPPORTED_CARD The reader cannot communicate with the card, due to ATR configuration conflicts. This error may be cleared by the SCardReconnect service.
0x80100066 SCARD_W_UNRESPONSIVE_CARD The card is not responding to a reset. This error may be cleared by the SCardReconnect service.
0x80100067 SCARD_W_UNPOWERED_CARD Power has been removed from the card, so further communication is not possible. This error may be cleared by the ScardReconnect service.
0x80100068 SCARD_W_RESET_CARD The card has been reset, so any shared state information is invalid. This error may be cleared by the SCardReconnect service.
0x80100069 SCARD_W_REMOVED_CARD The card has been removed, so further communication is not possible. This error may be cleared by the SCardReconnect service.
0x8010006A SCARD_W_INSERTED_CARD ???

 

weitere Informationen zu der Lehrveranstaltung:

empfohlenes Studiensemester der Lehrveranstaltung: Hauptstudium
Fachrichtung Lehrveranstaltung: Informatik
Nummer der Lehrveranstaltung: 07065
Dauer der Lehrveranstaltung: 2 SWS
Typ der Lehrveranstaltung: V - Vorlesung
Leistungspunkte: 8 LP für WV + Ü
Bereich: Softwaretechnik und Programmiersprachen
Prüfung: Mündliche Prüfung
Begleitende Lehrveranstaltung(en): 07066
Semester: WS 2008/09