Practices
  Home arrow Practices arrow Page 6 - Smart Cards: An Introduction
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PRACTICES

Smart Cards: An Introduction
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 52
    2004-10-11


    Table of Contents:
  • Smart Cards: An Introduction
  • Use and Types of Smart Cards
  • The ICC and Harvard Architecture
  • Memory in Smart Cards
  • Communicating with the Outside World
  • APDU
  • TPDU and ATR
  • Operating System and File System
  • Standards Governing Smart Cards

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Smart Cards: An Introduction - APDU
    ( Page 6 of 9 )

    The APDU is an application level protocol as specified in the ISO 7816-4, which takes place between a smart card and a host application for the communication purpose.

    APDU consist of two structures, as defined below:

    1. Command APDU (C-APDU: this command is used by the host application to send command to the card.
      1. Header: it consist of 4 bytes:-
        1. Class of instruction (CLA)
        2. Instruction code (INS)
        3. Parameters: P1 and 2

      2. Optional body: varies in length.
        1. Lc = specifies the length of the optional body or the data field (Bytes).
        2. Le = specifies the length of the data or the number of bytes that the host is expecting in response to the command sent.
        3. Data field contains the data that are sent to the card for executing the instruction specified in the header.

    2. Response APDU (R-APDU): this command is used by the card in order to respond to the command send by the host application.
      1. Optional body: it consist of data field whose length is specified by the Le
      2. Trailer: it consist of two words SW1 and SW2 called as status word, which denotes the processing state in the card after the execution of the command APDU.

    Structure of the APDU is given below:

    1. Command APDU

    Mandatory Header Optional body
    CLA INS P1 P2 Lc Data Field Le

    2. Response APDU

    Optional body Mandatory Trailer
    Data Field SW1 SW1

    Note:

    • A command is always paired with response APDU
    • The data field is optional in both command APDU and response APDU.

    The second case further divides the command and response APDU in four categories.

    1. There is no transfer of data to or from the card
      1. C- APDU: contains header only.
      2. R- APDU: contains only the trailer status word.

    2. There is no transfer of data to the card but data are returned from the card
      1. C- APDU: contains Le only, which specifies the number of data bytes in the corresponding response APDU.

    3. There is transfer of data to the card but no data is returned from the card
      1. C- APDU: contains Lc and data field, Lc which specifies the length of the data field.
      2. R-APDU: contains the trailer status word SW1 and SW2.

    4. There is transfer of data to the card and data is returned from the card
      1. C- APDU: contains Lc and data field and Le.
      2. R-APDU: contains both the optional body and the trailer status word SW1 and SW2.



     
     
    >>> More Practices Articles          >>> More By Digvijay Chauhan
     

       

    PRACTICES ARTICLES

    - More Techniques for Finding Things
    - Finding Things
    - Finishing the System`s Outlines
    - The System in So Many Words
    - Basic Data Types and Calculations
    - What`s the Address? Pointers
    - Design with ArgoUML
    - Pragmatic Guidelines: Diagrams That Work
    - Five-Step UML: OOAD for Short Attention Span...
    - Five-Step UML: OOAD for Short Attention Span...
    - Introducing UML: Object-Oriented Analysis an...
    - Class and Object Diagrams
    - Class Relationships
    - Classes
    - Basic Ideas





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek