\chapter{About the Template (and Chip Cards)}
%\label{chapter:title}

This chapter is intended to provide a gentle introduction to the field of smart cards. For this reason, the various types of hardware are discussed at the beginning of this work. Since a chip card without a reader is like a fish without water, this hardware component is also covered. Finally, to illustrate the ubiquity of chip cards, an insight into the possible applications of these mini-computers is provided.

Unless otherwise stated, the information in this chapter is taken from the two standard works on chip cards, \textit{Handbuch der Chipkarten} \cite{HandChip} and \textit{Chipkartenanwendungen} \cite{ChipAnw}.

%-----------------------------------------------------------------------------------------------------------------------------------------
\section{Types von Chipkarten}
%-----------------------------------------------------------------------------------------------------------------------------------------
Due to the many possible uses of chip cards, which require varying degrees of security and mobility, chip cards can be distinguished according to two criteria: chip type and data transmission. Based on the chip type, the \textit{cards} are divided into memory and processor chip cards, whereas data transmission divides them into contact, contactless, and dual-interface cards.

Unlike memory chip cards, processor chip cards have much stronger security measures implemented and serve as small data safes. Contact cards can only be read by a suitable reader with a plug-in device. In contrast, contactless cards can only communicate via the air interface. Dual-interface cards are a combination of these two types and can use both transmission technologies. This thesis deals mainly with processor chip cards and only discusses memory chip cards to the extent necessary to explain the difference between them to the reader.

Memory chip cards are only mentioned for the sake of completeness.

%--------------------------------------------------------------------
\subsection{Memory Chip Cards}
%--------------------------------------------------------------------
Memory chip cards have a very simple logic that only allows data to be written to the memory area on the card
and read back again. They have very weak security measures (e.g., no increase in the remaining balance
for prepaid cards for telephone booths) to protect the data, which makes them unsuitable for high-security applications.

 Due to the low security requirements, these cards do not need an expensive (co-)processor.
All that is needed is EEPROM, ROM, and memory management, possibly with integrated security logic.
Memory chip cards are also not as well equipped to withstand physical attacks as high-quality
processor cards. Due to \textit{this} simple design, their price is also comparatively low. A schematic
diagram is shown in Figure \ref{fig:basics:memory card structure}.


\begin{figure}[ht]
 \centering
 \includegraphics{figures/speicherkarte}
 \caption{Schematic Layout of a Chip Card}
 \label{fig:grundlagen:speicherkartenaufbau}
\end{figure}

%--------------------------------------------------------------------
\subsection{BER-TLV}
%--------------------------------------------------------------------
The BER-TLV encoding (basic encoding rule) was defined in the ITU-T Rec. X.690 standard (see \cite{ITU:X.690})
and is adopted in a slightly restricted form by the ISO standard \cite{ISO:Part1}. Due to the limited storage capacity
of chip cards, the maximum capacity of these data objects was reduced to a practical level. Due to the TLV structure, a BER-TLV data object consists of an identifier, a length specification, and the optional
payload part (see Figure \ref{fig:smartcards:TLV:BER}).

%---------------------------------------
\subsubsection{Tag}
%---------------------------------------
According to the ISO standard, the designation (see Table \ref{fig:smartcards:tlv:bertlvbyteone1}) may have a length of one, two, or three bytes.
The first byte has a special meaning. It assigns the data object (bits 7 and 8) to one of four classes.
\begin{enumerate}
\item $00$ forms the universal class
\item $01$ forms the application class
\item $10$ forms the context-specific class
\item $11$ forms the private class
\end{enumerate}

\begin{table}[h]
\centering
\begin{tabular}{|cc|c|ccccc|l|}
\hline 
  b8 & b7 & b6 & b5 & b4 & b3 & b2 & b1 & Meaning                           \\ \hline
   0 &  0 &  - &  - &  - &  - &  - &  - & universal class                  \\
   0 &  1 &  - &  - &  - &  - &  - &  - & Apllication class                  \\
   1 &  0 &  - &  - &  - &  - &  - &  - & context-specific class         \\
   1 &  1 &  - &  - &  - &  - &  - &  - & private class                      \\ \hline
   - &  - &  0 &  - &  - &  - &  - &  - & simple (primitive)            \\
   - &  - &  1 &  - &  - &  - &  - &  - & constructed \\ \hline
   - &  - &  - &  x &  x &  x &  x &  x & simple Idetifyer               \\
   - &  - &  - &  1 &  1 &  1 &  1 &  1 & complext Identifyer               \\ \hline
\end{tabular}
\caption{Encoding of the First Identifier Byte according to the BER-TLV Scheme}
\label{fig:smartcards:tlv:bertlvbyteone1}
\end{table}

%-----------------------------------------------------------------------------------------------------------------------------------------
\section{No 1.1 without 1.2}
%-----------------------------------------------------------------------------------------------------------------------------------------

\vspace*{13cm}
No blank pages!
\newpage

%-----------------------------------------------------------------------------------------------------------------------------------------
\section{No multi-line headings; they look terrible and can always be avoided!}
%-----------------------------------------------------------------------------------------------------------------------------------------

%-----------------------------------------------------------------------------------------------------------------------------------------
\section{No multi-line headings;}
%-----------------------------------------------------------------------------------------------------------------------------------------
They look terrible and can always be avoided!

\vspace*{8cm}
\begin{itemize}
  \item Leave blank spaces only at the end of chapters!
  \item The last page should also be at least half full!
\end{itemize}
\newpage