简体   繁体   中英

What is the meaning of a DIR File and what is exactly a DDF In EMV ICC file structure?

I have been recently struggling to understand the meaning of a DIR file in Emv book 1. I dig a lit bit and I find that my perspective of a folder got me to the wrong path. For me a ' Directory ' is equal to a ' folder ' that contains only other elements. So when I was going through Emv specifications they said after selecting a DDF or an ADF it sends back the FCI. So I was confused as I was seeing DDF and ADF just as folders so where they store FCI's data. I get more confused when I read "Directories are optional within an ICC" .

Can someone please explain to me what is a Directory in ICC and what is the difference between a DDF and its related DIR A that exists in all examples of the section: " Annex C Examples of Directory Structures " of emv book 1 Thank you.

emv specifications

Can someone please explain to me what is a Directory in ICC.

EMV card file structure is based on ISO/IEC 7816-4. You better read it first. There you can find detailed description of many terms you are talking about. Generally, there are two types of card files: DF (dedicated file) and EF (elementary file). EF cantains binary data. DF can contain any file. Every file (both DF and EF) can be selected with APDU SELECT. Every selected file can send as a response FCI structure -- data with general information about this file (type, size, attributes and so on).

what is the difference between a DDF and its related DIR

EMV book 1: "The DIR file is an AEF (in other words, an EF ) with a record structure according to this specification including the following data objects according to ISO/IEC 7816-4. ..."

DDF and ADF are subtypes of DF . An ADF is the entry point to one or more Application Elementary Files (AEFs). A DDF is an entry point to other ADFs or DDFs.

I fully agree with Nikolays answer, just to improve understanding by phrasing differently:

  • What is called a directory on a PC, is called DF on a smart card.
  • A directory as EF.DIR on a smart card is more like a phone book type of directory: A file you can traverse to find what is present on the card, hopefully with some additional attributes, so you can identify the entry search for.

Thank you Nikolay and Guidot for replaying to my question. I really appreciate.

I did some research too and I find that the file management system for Smart cards have an object-oriented structure . This means that all information about a file is stored in the file itself.

Files in such object oriented systems are always divided into two parts:

  • The header which contains administrative data: information about the layout, the structure of the file and its access conditions... &
  • The body which contains user data and they are linked to each other by a pointer

As ISO/IEC 7816-4 specified there are basically two categories of files for file smart cards: The first category is directory files, which are called 'dedicated files' (DFs). They acts as a sort of folder containing other, lower level DFs or EFs

The second category consists of the files that hold the actual user data, which are called 'elementary files' (EFs).

To sum-up , my perspective of a directory was wrong from the beginning. I was fooled by the Windows Icon of a directory and I forget that it's a file itself which contains references to other computer files, and possibly other directories.

For emv Smart Cards:

"A dedicated file (DF) as defined in ISO/IEC 7816-4 and containing a FCI is mapped onto an ADF or a DDF. It may give access to elementary files and DFs. The DF at the highest level of the card is the master file (MF)." emv book 1

So yes an ADF is a DF, and it is seen from the terminal as a file containing only data objects encapsulated in its file control information (FCI).

Let's have a concrete example to fully understand this concepts:

If we suppose we have a Payment system environment in our smart card, this means we have a DDF which is PSE DDF and this DDF gives access to an EF which is PSD Payment System Directory file (DIR file), the location of which is indicated in the FCI of the PSE DDF.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM