Search code examples
smartcardapduemv

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


Solution

  • 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.