1 / 23

DebitCard Application with ZeitControl BasicCard

DebitCard Application with ZeitControl BasicCard. Selim GULLULU 504042001 selim.gullulu@alcatel.com.tr. Contents. Memory Card vs. Smart Card (ZC BasicCard) BC Versions + Environment&Programming Hardware & Software Definitions Demonstration - Card Personalisation

yvon
Download Presentation

DebitCard Application with ZeitControl BasicCard

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DebitCard Application with ZeitControl BasicCard Selim GULLULU 504042001 selim.gullulu@alcatel.com.tr

  2. Contents • Memory Card vs. Smart Card (ZC BasicCard) • BC Versions + Environment&Programming • Hardware & Software Definitions • Demonstration - Card Personalisation • Demonstration – Food Automat

  3. Memory Card vs. Smart Card (ZC BasicCard) • Memory Cards:EEPROM Storage Only • ZC BasicCard : Microcontroller with RAM (for operation), ROM (for holding BasicCard OS) and EEPROM for holding your data and your program • ZC BasicCard : The program executed by the microcontroller has access to the data stored in EEPROM, so the program decides which data is exchanged with the outer world

  4. The Card Used In The Project BasicCard Versions

  5. Communicating With Smart Card

  6. BasicCard Environment & Programming • No Keyboard or Screen ? • Talks to outside world with bi-directional I/O Contact at 9600 bps or more (ISO/IEC standards 7816-3 and 7816-4) • Define a command in the card and program it like an ordinary Basic procedure • Call the command from a ZC-Basic program running on the PC • Two-byte ID for each defined command (ISO/IEC 7816-4: CLA and INS for CLAss and INStruction

  7. Command Example • Command In BasicCard: Eeprom CustomerCredits Command &H20 &H02 GetCustomerCredits (Credits) Credits = CustomerCredits End Command • To call the command from PC: Const swCommandOK = &H9000 Declare Command &H20 &H02 GetCustomerCredits (Credits) Status = GetCustomerCredits (Credits) If Status <> swCommandOK Then GoTo CancelTransaction

  8. Defining EEPROM Variables • Eeprom Balance As Long • Eeprom MasterPIN As String*6 = "123456“ • ...

  9. Technical Summary Of BasicCard(s) All BasicCard families (Compact,Enhanced,Pro,Multiapp) • A full implementation of the T=1 block-level communications protocol defined in ISO/IEC 7816-3: Electronic signals and transmission protocols; • A command dispatcher built around the structures defined in ISO/IEC 7816-4 (CLA INS P1 P2 [LcIDATA] [Le] • Built-in commands for the execution of ZeitControl’s P-code • Code for the automatic encyrption and decyption of commands and responses,using AES, DES,or SG-LFSR symmetric-key algorithm

  10. Technical Summary Of BasicCard(s) (Continued) Enhanced BasicCards contain all of the above,plus: • A directory-based, dos-like file system • IEEE-compatible floating-point arithmetic

  11. Card Readers • Whenever you access a BasicCard or a Card Reader from a ZC-Basic Terminal Program, ZeitControl’sP-Code Interpreter uses the current value of the ComPort variable to determines where to look for theCard Reader. • A ZC-Basic program compiled into an executable file accepts the following values for the ComPort: 1 <= ComPort <= 4:Physical Card Reader on serial port COM1-COM4

  12. CyberMouse

  13. Search Card Reader (1)

  14. The Comport To be used Search Card Reader (2)

  15. Search Card Reader (3) Use “API select Default Reader” for Windows XP

  16. ZC BasicCard ActiveX Control Module

  17. BasicCard VB library

  18. Private Sub SetValues_Click() Dim PIN As String * 4 Dim tmp As Long PIN = PIN1.Text ErrorMsg.Panels(1).Text = "Verifing..." DoEvents MyCard.Err = MyCard.IssuerEncrypt(Key, DesKey) If MyCard.Err = 0 Then tmp = Balance.Text * 100 MyCard.Err = MyCard.PersonaliseCard(tmp, PIN, ClientName.Text) End If If MyCard.Err = 0 Then ErrorMsg.Panels(1).Text = "Personalization successful." Else ErrorMsg.Panels(1).Text = DebitErrors(0) End If MyCard.EndEncryption MyCard.ReleaseCard End Sub Command Definitions Ex. – Set Values (in PC)

  19. Command Definitions Ex – Set Values (Cont’d) (in PC) Public Function PersonaliseCard(Amount As Long, _ NewPIN As String, Name As String) Dim tmp As String * 4 tmp = NewPIN BasicCard.Param1 = Amount BasicCard.Param2 = tmp BasicCard.Param3 = Name PersonaliseCard = BasicCard.Transaction(&H80, &H0, 3) Err = BasicCard.LastErr SW1SW2 = BasicCard.SW1SW2

  20. Command Definitions Ex. – Set Values (Cont’d) ( BC) Command &H80 &H00 PersonaliseCard (Amount As Long, NewPIN As String*4, Name$) Call CheckAlgorithm() If GetKeyNumber@() <> 0 Then SW1SW2 = swIssuingKeyRequired : Exit Personalised = False Balance = Amount CustomerName$ = Name$ PIN = NewPIN Personalised = True End Command

  21. Here, the card type we used is selected. The code that we want to compile Compiling the ZCBasic Code

  22. The Com Port taht we attached the reader (Search card Reader) Downloading The Code To BasicCard

  23. Demonstration (Personalisation & Food Automat)

More Related