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  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
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? 
PRACTICES

Smart Cards: An Introduction
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 48
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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 HeaderOptional body
    CLAINSP1P2LcData FieldLe

    2. Response APDU

    Optional bodyMandatory Trailer
    Data FieldSW1SW1

    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


       · good article, but please pick one font face and size and stick with it!
       · Thanks for the heads up. Problem fixed. Looks much nicer now ;).Gnorb
       · Hi,I'm Digvijay ... author of this article.Please leave your comments and...
       · I am searching for this over a considreable period of time. It happened now. Please...
       · Hi digvijay, its a nice article.....thanx for sharin ur knowledge with...
       · i dont belive in this smartcard because what if someone finds it they will have all...
     

       

    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

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT