Merge branch 'master' of github.com:BetterCrypto/Applied-Crypto-Hardening
[ach-master.git] / src / applied-crypto-hardening.tex
1 %%% LaTeX Template: Two column article
2 %%%
3 %%% Source: http://www.howtotex.com/
4 %%% Feel free to distribute this template, but please keep to referal to http://www.howtotex.com/ here.
5 %%% Date: February 2011
6
7 %%% Preamble
8 \documentclass[ DIV=calc,%
9                                 paper=a4,%
10                                 fontsize=9pt,%
11                                 %onecolumn]{scrartcl}                                           % KOMA-article class
12                                 onecolumn]{scrreprt}                                            % KOMA-article class
13                                 %onecolumn]{report}                                             % KOMA-article class
14
15 \usepackage{lipsum}                                                                                                     % Package to create dummy text
16
17
18
19 \usepackage[english]{babel}                                                                             % English language/hyphenation
20 \usepackage[utf8]{inputenc}                                                                             % UTF-8 as input-encoding
21 \usepackage[protrusion=true,expansion=true]{microtype}                          % Better typography
22 \usepackage{amsmath,amsfonts,amsthm}                                    % Math packages
23 \usepackage[pdftex]{graphicx}                                           % Enable pdflatex 
24 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
25 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
26 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
27 \usepackage{subfig}                                                                                                     % Subfigures
28 \usepackage{fix-cm}                                                                                                     % Custom fontsizes
29
30 \usepackage[usenames,dvipsnames]{color}
31 \usepackage{float}
32 \usepackage{subfig}
33 %\usepackage{tikz}
34 \usepackage{acronym}
35 \usepackage{amsthm}
36 \usepackage{fancyvrb}
37 \usepackage{upquote}                                                                                            % For correct single quotes in listings
38 \usepackage{listings}
39 \usepackage{longtable}
40
41 %% Epigraph patching
42 \usepackage{epigraph}
43 % \epigraphsize{\small}% Default
44 \setlength\epigraphwidth{8cm}
45 \setlength\epigraphrule{0pt}
46 \usepackage{etoolbox}
47 \makeatletter
48 \patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
49 \makeatother
50
51
52
53 \usepackage{gitinfo}
54
55 % custom changes:
56 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
57 \usepackage{placeins}
58 \usepackage{draftwatermark}
59
60 % human tables
61 \usepackage{booktabs}
62 \renewcommand{\arraystretch}{1.25}
63
64 % side box
65 \usepackage{wrapfig}
66 %\usepackage{tcolorbox}
67 \newenvironment{WrapText}[1][r]
68   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
69   {\endtcolorbox\endwrapfigure}
70
71 % Add text symbols
72 \usepackage{pifont}
73 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
74 \newcommand{\no}{\textcolor{red}{\ding{55}}}
75
76
77 % Colours
78 \definecolor{green}{RGB}{32,113,10}
79 \definecolor{orange}{RGB}{251,111,16}
80 \definecolor{red}{RGB}{247,56,0}
81 \definecolor{blue}{RGB}{0,28,128}
82 \definecolor{lightgreen}{RGB}{187,218,216}
83 \definecolor{intersectgreen}{RGB}{103,133,155}
84 \definecolor{darkblue}{RGB}{76,87,117}
85
86 \bibliographystyle{alphalink}
87
88 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
89 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
90 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
91 \definecolor{lightlightgray}{gray}{0.9}
92
93 \usepackage{titlesec}
94 %\allsectionsfont{\color{darkblue}\itshape\underline}
95 %\sectionfont{\color{darkblue}\itshape\selectfont}
96 %\subsectionfont{\color{darkblue}\itshape\selectfont}
97 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
98 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
99
100
101 % makes default font sans-serif
102  \renewcommand{\familydefault}{\sfdefault}
103
104 % make font Open Sans
105 % \usepackage{opensans}
106 \usepackage[defaultsans]{opensans}
107
108 % changes font encoding to T1
109 % \usepackage[T1]{fontenc}
110 % \usepackage{textcomp}
111
112 % This block is for listings
113 \usepackage[framemethod=TikZ]{mdframed} % mdframed is used to draw a grey box
114 \mdfdefinestyle{listingstyle}{
115   backgroundcolor=black!10,outerlinewidth=0,outerlinecolor=black,
116   innerleftmargin=0,innerrightmargin=0,innertopmargin=0pt,innerbottommargin=0pt
117 }
118 \usepackage{amssymb}% for \curvearrowright
119 % Insert a grey box behind the listing for uniform background color (The \cipherstring would the listing and the background would turn white)
120 \BeforeBeginEnvironment{lstlisting}{\vspace{0.2cm}\begin{mdframed}[style=listingstyle]}
121 \AfterEndEnvironment{lstlisting}{\end{mdframed}}
122 \lstset{
123 %language=Bash,                             % Code langugage
124 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
125 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
126 commentstyle=\color{gray},              % Comments font
127 %numbers=left,                           % Line nums position
128 %numberstyle=\tiny,                      % Line-numbers fonts
129 %stepnumber=1,                           % Step between two line-numbers
130 %numbersep=5pt,                          % How far are line-numbers from code
131 backgroundcolor=\color{lightlightgray}, % Choose background color
132 frame=none,                             % A frame around the code
133 tabsize=2,                              % Default tab size
134 captionpos=b,                           % Caption-position = bottom
135 breaklines=true,                        % Automatic line breaking?
136 breakatwhitespace=false,                % Automatic breaks only at whitespace?
137 showspaces=false,                       % Dont make spaces visible
138 showstringspaces=false,
139 showtabs=false,                         % Dont make tabls visible
140 columns=fullflexible,                   % Column format: no spaces are inserted for monospaced appearance
141 morekeywords={__global__, __device__},  % 
142 escapeinside={\%*}{*)},                 % Escape TeX commands inside %* and *)
143 prebreak=\mbox{$\curvearrowright$},     % Disply curved arrow before linebreak
144 xrightmargin=1.8pt,
145 }
146
147
148 %% \todo{} command.
149 %
150 % Outputs red TODOs in the document. Requires \usepackage{color}.
151 %
152 % Usage: \todo{Document the TODO command.}
153 %
154 % Comment out second line to disable.
155 \newcommand{\todo}[1]{}
156 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
157
158
159 %%% Custom sectioning (sectsty package)
160 \usepackage{sectsty}                                                                                                    % Custom sectioning (see below)
161 \allsectionsfont{%                                                                                                                      % Change font of al section commands
162         %\usefont{OT1}{phv}{b}{n}%                                                                              % bch-b-n: CharterBT-Bold font 
163 \bfseries                                                                                                                       % should make it Open Sans Bold
164         }
165
166 \sectionfont{%                                                                                                                          % Change font of \section command
167         %\usefont{OT1}{phv}{b}{n}%                                                                              % bch-b-n: CharterBT-Bold font
168 \bfseries       
169         }
170
171 % use more of the page
172 \usepackage{fullpage}
173
174 %%% Headers and footers
175 \usepackage{fancyhdr}                                                                                           % Needed to define custom headers/footers
176         \pagestyle{fancy}                                                                                                               % Enabling the custom headers/footers
177 \usepackage{lastpage}   
178
179 % Header (empty)
180 \lhead{}
181 \chead{}
182 \rhead{}
183 % Footer (you may change this to your own needs)
184 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
185 \cfoot{}
186 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
187 \renewcommand{\headrulewidth}{0.0pt}
188 \renewcommand{\footrulewidth}{0.4pt}
189
190
191
192 %%% Creating an initial of the very first character of the content
193 \usepackage{lettrine}
194 \newcommand{\initial}[1]{%
195      \lettrine[lines=3,lhang=0.3,nindent=0em]{
196                                 \color{darkblue}
197                                 {\textsf{#1}}}{}}
198
199
200
201 %%% Title, author and date metadata
202 \usepackage{titling}                                                                                                                    % For custom titles
203
204 \newcommand{\HorRule}{\color{darkblue}%                 % Creating a horizontal rule
205                                                                                 \rule{\linewidth}{1pt}%
206                                                                         }
207
208
209 \pretitle{\vspace{-30pt} \begin{flushleft} \HorRule 
210                                 \fontsize{35}{36} \bfseries \color{darkblue} \selectfont 
211                                 }
212                         \title{Applied Crypto Hardening}% \\ \vskip 0.5em \large www.bettercrypto.org}
213 \posttitle{\par\end{flushleft}\vskip 0.5em}
214
215 \preauthor{\begin{flushleft}
216                                         \large \lineskip 0.5em  
217                                         \color{intersectgreen}}
218                                         %\vskip 0.5em
219                                         \author{Wolfgang Breyha, David Durvaux, Tobias Dussa, L. Aaron
220                                         Kaplan, Florian Mendel, Christian Mock, Manuel Koschuch, Adi
221                                         Kriegisch, Ulrich Pöschl, Ramin Sabet, Berg San, Ralf Schlatterbeck, 
222                                         Thomas Schreck, Aaron Zauner, Pepi Zawodsky}
223 %\institute{
224 %FH Campus Wien
225 %\and
226 %VRVis
227 %\and
228 %CERT.at
229 %\and
230 %Karlsruhe Institute of Technology
231 %}
232
233
234 \setlength{\parindent}{0cm}
235
236 \postauthor{\footnotesize  \color{Black}  \vskip 2.5em
237   (University of Vienna, CERT.be, KIT-CERT, CERT.at, IAIK, coretec.at, FH Campus Wien, VRVis, MilCERT Austria, A-Trust, Runtux.com, Friedrich-Alexander University Erlangen-Nuremberg, azet.org, maclemon.at)
238                                         \par\end{flushleft}\HorRule}
239
240 \date{\today}
241
242 %tell TeX where to look for graphics/logos
243 \graphicspath{ {/img/} }
244
245 % hyperref needs to be the last package you load.
246 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
247
248 % CIPHERSTRING
249 \usepackage{seqsplit} % Use Sequence split. Basically it inserts between every character pair a box with zero width to allow linebreaks everywhere. Better solution wanted, but is there any better?
250 \newcommand{\cipherstringB}{\seqsplit{EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA}}
251
252 %%% Begin document
253 \begin{document}
254 \maketitle
255
256 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
257 % The first character should be within \initial{}
258 %\initial{H}\textbf{ere is some sample text to show the initial in the introductory paragraph of this template article. The color and lineheight of the initial can be modified in the preamble of this document.}
259
260 % add logo graphic
261 %\includegraphics{img/logo}
262
263 \input{neboltai}
264 \input{acknowledgements}
265 \input{abstract}
266 \tableofcontents
267 \chapter{Introduction}
268 \label{chapter:Intro}
269 \input{whoshouldread}
270 \input{related_publications}
271 \input{howtoread}
272 \input{disclaimer}
273 \input{motivation}
274 \input{methods}
275 %%
276 \chapter{Practical recommendations}
277 \label{chapter:PracticalSettings}
278 \input{practical_settings}
279 %%
280 \chapter{Theory}
281 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{-- Leopold Kronecker}
282 \label{chapter:Theory}
283 \input{theory}
284 \chapter{Appendix}
285 \input{tools}
286 \input{links}
287 \input{suggested_reading}
288 \input{cipher_suite_names}
289 \input{further_research}
290 %\input{reviewers}
291 \input{bib}
292
293 \end{document}