% !TeX document-id = {d0131329-7dff-4168-88a3-c27d7b35cb69}
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !BIB program = biber

% Template Revision:
% Rev. C1 -- 2021-03-18 -- Ali Varli
% Rev. B1 -- 2019-11-05 -- Ali Varli

%% HINWEISE:
%% MAIN.tex ist die Hauptdatei. Hier sind sämtliche Pakete eingebunden und die allgemeine Struktur ist hier festgelegt. Im Allgemeinen müssen hier keine Änderungen vorgenommen werden.
%% In der eingebundenen Datei config.tex müssen Änderungen vorgenommen werden, die in der Datei näher erläutert sind.
%% Das Deckblatt wird mit der Datei cover/coversheet.tex eingebunden. Hier sollten keine Änderungen vorgenommen werden.
%% Für Text im Vorspann (vor der Inhaltsangabe, z.B. für Vorwort, Abstract etc.) ist die Datei frontmatter.tex vorgesehen.
%% Für den Hauptteil ist die Datei mainmatter.tex vorgesehen.
%% Das Literaturverzeichnis ist die eingebundene Datei literature.bib.
%% Für Verbesserungsvorschläge bin ich gerne offen.
%% Viel Erfolg :). Linz, im Oktober 2019, Ali Varli, a_v@gmx.net.

%% PLEASE NOTE:
%% MAIN.tex is the main file. All packages are pooled here and the general structure is defined here. In general, no changes need to be made here.
%% Changes must be made in the included file config.tex. Detailed information is in the file.
%% The cover page is included with the file cover/coversheet.tex. No changes should be made here.
%% The file frontmatter.tex is provided for text in the lead text (before the summary, i.e. for the foreword, abstract, etc.).
%% The file mainmatter.tex is intended for the main part.
%% The bibliography is the included file literature.bib.
%% I am open to suggestions for improvement.
%% Good luck :-). Linz, October 2019, Ali Varli, a_v@gmx.net.

\documentclass[%
	a4paper,
	11pt,
	BCOR=10mm,
	DIV=12,
	headinclude,
	headheight=16mm,
	oneside,
	onecolumn,
	openany,
	parskip=half,
	% appendixprefix,
	% toc=flat,
	% chapterentrydots=true,
	table,
	fleqn,
	% draft
]{scrbook}

\usepackage[utf8]{inputenc}

\input{config}

\usepackage[T1]{fontenc}
\usepackage{roboto,mathpazo}
\usepackage{microtype}
\ifeng
	\usepackage[ngerman,english]{babel}
\else
	\usepackage[english,ngerman]{babel}
\fi
\usepackage[absolute]{textpos}
\usepackage{amsmath,siunitx}
%% Zitierweise numerisch, Literaturverzeichnis alphabetisch sortiert:
%% Citation listed numerically, bibliography listed alphabetically:
\usepackage[
	backend=biber,
	sortlocale=auto,
	style=numeric-comp,
	backref=true,
	backrefstyle=none,
	maxbibnames=999
]{biblatex}
%% Zitierweise numerisch, Literaturverzeichnis unsortiert:
%% Citation listed numerically, bibliography unsorted:
% \usepackage[backend=biber,sorting=none,style=numeric-comp,backref=true,backrefstyle=none]{biblatex}
%% Zitierweise Autor-Jahr, Literaturverzeichnis alphabetisch sortiert:
%% Citation listed by author-year, bibliography listed alphabetically:
% \usepackage[backend=biber,style=authoryear,bibstyle=authoryear,citestyle=authoryear,maxcitenames=2,backref=true,backrefstyle=none]{biblatex}
\addbibresource{literature.bib}
\usepackage{csquotes}
\usepackage{lastpage,scrlayer-scrpage}
\pagestyle{scrheadings}
\clearpairofpagestyles

%\ifeng
%	\ohead*{\includegraphics[width=3cm]{cover/jkuen.png}}
%\else
%	\ohead*{\includegraphics[width=3cm]{cover/jkude.png}}
%\fi

%\ifoot*{\date}
%\cfoot*{\author}
\ohead*{\rightmark}
\ofoot*{\pagemark}
%\ofoot*{\pagemark/\pageref{LastPage}}

\setkomafont{pageheadfoot}{\sffamily\scriptsize}
\setkomafont{pagenumber}{\sffamily\scriptsize}

\usepackage[onehalfspacing]{setspace}
\usepackage{pdfpages}
\usepackage{booktabs,colortbl,xcolor}
\usepackage{graphicx,wrapfig}
\usepackage[section]{placeins} %\FloatBarrier
\usepackage{float} %[H]
\usepackage{enumitem}
\usepackage{subfiles}
\usepackage{scrhack}
\usepackage[
	bookmarksnumbered=true,
	pdfborder={0 0 0},
	pdfa,
	pdftitle={\pdfTitle},
	pdfauthor={\pdfAuthor},
	pdfsubject={\pdfSubject},
	pdfkeywords={\pdfKeywords}
]{hyperref}

%own packages
% \usepackage{libertine}
% \usepackage{libertinust1math}
\usepackage[scale=0.9]{sourcecodepro}
\usepackage{listings}

% \setcounter{tocdepth}{3} %subsubsection
% \setcounter{secnumdepth}{3}

\tolerance=300
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000

% \addtocontents{toc}{\protect\enlargethispage{2\normalbaselineskip}}
% \addtocontents{lof}{\protect\enlargethispage{2\normalbaselineskip}}
% \addtocontents{lot}{\protect\enlargethispage{2\normalbaselineskip}}

\addtokomafont{caption}{\small}
\setkomafont{captionlabel}{\small\sffamily\bfseries}

\newcommand{\zB}{z.\,B.\@}
\newcommand{\eg}{e.\,g.\@}
\newcommand{\ToDo}{\normalfont\normalsize\textcolor{red}{\textbf{ToDo!}}}

\urlstyle{sf}

\lstset{
	language=C,													%language
	basicstyle=\ttfamily\footnotesize,	%common font style
	xleftmargin=10pt,
	numbers=left,												%line numbers
	numberstyle=\scriptsize,
	numberfirstline=true,
	stepnumber=1,
	numbersep=5pt,
	tabsize=2,													%size of tabulator
	columns=flexible,
	upquote=true,
	breaklines=true,										%automatischer Zeilenumbruch
	lineskip=0.1ex,
	literate=														%Umlauts in source files
	{Ö}{{\"O}}1
	{Ä}{{\"A}}1
	{Ü}{{\"U}}1
	{ß}{{\ss}}2
	{ü}{{\"u}}1
	{ä}{{\"a}}1
	{ö}{{\"o}}1
}
\newcommand{\issuer}[1][]{$\mathcal{I}_{#1}$}
\newcommand{\host}[1][]{$\mathcal{H}_{#1}$}
\newcommand{\tpm}[1][]{$\mathcal{M}_{#1}$}
\newcommand{\verifier}[1][]{$\mathcal{V}_{#1}$}
\newcommand{\bsn}{\texttt{bsn}}
\newcommand{\nym}{\texttt{nym}}
\newcommand{\RL}{\texttt{RL}}
\newcommand{\sassign}{\stackrel{\$}{\leftarrow}}
\addto\extrasenglish{
  \renewcommand{\tableautorefname}{Table}
  \renewcommand{\figureautorefname}{Figure}
  \renewcommand{\chapterautorefname}{Chapter}
  \renewcommand{\sectionautorefname}{Section}
  \renewcommand{\subsectionautorefname}{Subsection}
  \renewcommand{\subsubsectionautorefname}{Subsubsection}
  \renewcommand{\paragraphautorefname}{Paragraph}
}

%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%

\begin{titlepage}
	\setcounter{page}{0}
	\include{cover/coversheet}
\end{titlepage}


%%%%%%%%%%%%
\frontmatter

\input{frontmatter}

\begin{singlespace}
	\tableofcontents
\end{singlespace}

  \newpage
  \hspace{0pt}
  \vfill
  This work has been carried out within the scope of Digidow,
  the Christian Doppler Laboratory for Private Digital Authentication
  in the Physical World, funded by the Christian Doppler
  Forschungsgesellschaft, 3 Banken IT GmbH, Kepler
  Universit\"atsklinikum GmbH, NXP Semiconductors Austria GmbH, and
  Österreichische Staatsdruckerei GmbH.
  \vfill
  \hspace{0pt}

%%%%%%%%%%%
\mainmatter

\input{01_introduction}
\input{02_background}
\input{03_concept}
\input{04_implementation}
\input{05_testing}
\input{06_conclusion}


%%%%%%%%%%%
\backmatter

\printbibliography

%%%%%%%%%%%
\appendix
\input{07_appendix}

\end{document}
