\documentclass[12pt,a4paper,twoside]{thesis}

%% PACKAGES
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{bytefield}
\usepackage{cancel}
\usepackage[dvips]{color}
\usepackage{enumerate}
\usepackage{epigraph}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{indentfirst}
\usepackage{mathtools}
\usepackage{minted}
\usepackage{makeidx,shortvrb,latexsym}
\usepackage{pgfplots}
\usepackage{supertabular}
\usepackage{tikz}

%% setting epigraphs
\renewcommand{\epigraphsize}{\small}
\setlength{\epigraphwidth}{0.8\textwidth}
\let\origepigraph\epigraph
\renewcommand\epigraph[2]{\origepigraph{\textit{#1}}{\textsc{#2}}}

%% bytefield shit
\newcommand{\colorbitbox}[3]{%
\rlap{\bitbox{#2}{\color{#1}\rule{\width}{\height}}}%
\bitbox{#2}{#3}}


%% COMMANDS
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\angular}{\langle}{\rangle}

\newcommand{\naturalN}{\mathbb{N}}
\newcommand{\naturalPrime}{\mathbb{P}}
\newcommand{\integerZ}{\mathbb{Z}}
\newcommand{\factorBase}{\mathcal{B}}
\newcommand{\bigO}[1]{\ensuremath{\mathcal{O}\left(#1\right)}}
\newcommand{\openssl}{\textsc{OpenSSL}\ }
%% here adopting Wikipedia's notation <https://en.wikipedia.org/wiki/Isqrt>
\newcommand{\dsqrt}[1]{\ensuremath{isqrt(#1)}}
\newcommand{\idiv}{\ensuremath{//}}
\newcommand{\strong}[1]{\textbf{#1}}
\newcommand{\eulerphi}[1]{\varphi(#1)}
\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\rfrac}[2]{{}^{#1}\!/_{#2}}
\newcommand{\getsRandom}{\xleftarrow{r}}
\newcommand{\xor}{\oplus}
\newcommand{\legendre}[2]{({#1}/{#2})}
\newcommand{\PKArg}{${N, e}$}
\theoremstyle{plain}
\newtheorem*{theorem*}{Theorem}
\newtheorem*{definition*}{Definition}

\makeindex
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
\clearpage
{\pagestyle{empty}\origdoublepage}%
}
\let\cleardoublepage\clearemptydoublepage
% Note that colour boxes around links are NOT printed.
% The text itself can be coloured, replacing the bounding box, but
% when printing this may appear illegible;
% link colors can be set to black for printing purposes, like so:
%\hypersetup{colorlinks,%
%	citecolor=black,%
%	filecolor=black,%
%	linkcolor=black,%
%	urlcolor=black}
% Also note that this will conflict with the color package called
% earlier in this document if that is not set to the right option (e.g.
% dvips or pdflatex).
\begin{document}
%\phd  %se e' la tesi di dottorato, altrimenti non mettere nulla

\university{Universit\`a degli Studi di Trento}
\faculty{Facolt\`a di Scienze Matematiche Fisiche e Naturali}
\dept{Dipartimento di Scienze Informatiche}
\Logo{logo_unitn.jpg}
%% titolo del dottorato
% \phdtitle{}
%% titolo della tesi
\title{Question Authority}
\subtitle{An Inquiry into The Secure Layer}

\author{Michele Orr\`u}
\supervisor{Prof. Massimiliano Sala}
%% Uncomment the following two lines if a co-relator is present.
\twosupervisors
\firstreader{Dott. Emanuele Bellini}

% capo della scuola di dottorato o controrelatore
\secondreader{Prof. Fabio Massacci}
\accademico{Anno accademico $2012/2013$}

\frontespizio     % questo e` il frontespizio esterno, cioe' senza firme
\cleardoublepage
\signaturepage    % questo e` il frontesizio interno con le firme

%% DEDICA
%non e' ovviamente obbligatoria


\cleardoublepage \setcounter{page}{1} \pagenumbering{roman}
\pagestyle{plain} \tableofcontents
%\listoffigures
%\addcontentsline{toc}{chapter}{Elenco delle figure}
%\renewcommand{\listalgorithmname}{Elenco degli algoritmi}
%\listofalgorithms
%\addcontentsline{toc}{chapter}{Elenco degli algoritmi}
%\addcontentsline{toc}{chapter}{Introduction}
%% INTRODUCTION
%\include{ack}
%\addcontentsline{toc}{chapter}{Acknowledgment}
%\cleardoublepage
%\include{Introduction}
%\addcontentsline{toc}{chapter}{Introduction}
\cleardoublepage

%% THESIS BODY
\pagestyle{fancy} \pagenumbering{arabic} \mainmatter
\vspace*{3in}
\epigraph{
    Many persons who are not conversant with mathematical studies imagine that
    because the business of [Babbage's Analytical Engine] is to give results in
    numerical notation, the nature of the processes must consequently be
    arithmetical and numerical, rather than algebraical and analytical. This is an
    error. The engine can arrange and combine its numerical quantities exactly as if
    they were letters or any other general symbols; and in fact it might bring out
    its results in algebraical notation, were provisions made accordingly.}
         {Augusta Ada, Countess of Lovelace}


%% there is no copyright, but the right to copy.
\begin{figure}[b]
  \centering
  \includegraphics[width=80pt]{kopimi.png}
\end{figure}

\cleardoublepage

\markboth{}{}
% move this epigraph to a fitting place. I don't see why it fits here inside of
% the begin figure env. ~~ AK
%\epigraph{``[...] be conservative in what you do, be liberal in what
%you accept from others.''}{The robustness priciple or ``Postel's
%Law''~\cite{rfc761}}
%{\centering
%  \includegraphics[width=.9\textwidth]{neboltai.png}\par
%  \vbox{\emph{Do not talk unencrypted}}
%}

\include{preface}

\part{Prolegomena}
\include{ssl_prequisites}
\include{math_prequisites}

\part{Questions}
\include{fermat}
\include{wiener}
\include{pollard-1}
\include{williams+1}
\include{pollardrho}
\include{dixon}

\include{conclusions}

\backmatter
%%\bibliographystyle{ieeetr}
\bibliography{library}
\clearpage
\addcontentsline{toc}{chapter}{Bibliography}

\end{document}
