straight quotes in code samples
[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[protrusion=true,expansion=true]{microtype}                          % Better typography
21 \usepackage{amsmath,amsfonts,amsthm}                                    % Math packages
22 \usepackage[pdftex]{graphicx}                                           % Enable pdflatex 
23 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
24 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
25 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
26 \usepackage{subfig}                                                                                                     % Subfigures
27 \usepackage{fix-cm}                                                                                                     % Custom fontsizes
28
29 \usepackage[usenames,dvipsnames]{color}
30 \usepackage{float}
31 \usepackage{subfig}
32 %\usepackage{tikz}
33 \usepackage{acronym}
34 \usepackage{amsthm}
35 \usepackage{fancyvrb}
36 \usepackage{listings}
37 \usepackage{longtable}
38
39 %% Epigraph patching
40 \usepackage{epigraph}
41 % \epigraphsize{\small}% Default
42 \setlength\epigraphwidth{8cm}
43 \setlength\epigraphrule{0pt}
44 \usepackage{etoolbox}
45 \makeatletter
46 \patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
47 \makeatother
48
49
50
51 \usepackage{gitinfo}
52
53 % custom changes:
54 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
55 \usepackage{placeins}
56 \usepackage{draftwatermark}
57
58 % human tables
59 \usepackage{booktabs}
60 \renewcommand{\arraystretch}{1.25}
61
62 % side box
63 \usepackage{wrapfig}
64 %\usepackage{tcolorbox}
65 \newenvironment{WrapText}[1][r]
66   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
67   {\endtcolorbox\endwrapfigure}
68
69 % Add text symbols
70 \usepackage{pifont}
71 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
72 \newcommand{\no}{\textcolor{red}{\ding{55}}}
73
74
75 % Colours
76 \definecolor{green}{RGB}{32,113,10}
77 \definecolor{orange}{RGB}{251,111,16}
78 \definecolor{red}{RGB}{247,56,0}
79 \definecolor{blue}{RGB}{0,28,128}
80 \definecolor{lightgreen}{RGB}{187,218,216}
81 \definecolor{intersectgreen}{RGB}{103,133,155}
82 \definecolor{darkblue}{RGB}{76,87,117}
83
84 \bibliographystyle{alphalink}
85
86 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
87 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
88 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
89 \definecolor{lightlightgray}{gray}{0.9}
90
91 \usepackage{titlesec}
92 %\allsectionsfont{\color{darkblue}\itshape\underline}
93 %\sectionfont{\color{darkblue}\itshape\selectfont}
94 %\subsectionfont{\color{darkblue}\itshape\selectfont}
95 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
96 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
97
98
99 % makes default font sans-serif
100  \renewcommand{\familydefault}{\sfdefault}
101
102 % make font Open Sans
103 \usepackage[defaultsans]{opensans}
104
105 % changes font encoding to T1 -> to get the right text quotes for code strings
106 %\usepackage[T1]{fontenc}
107 \usepackage[TS1,T1]{fontenc}
108 \usepackage{textcomp}
109 \usepackage{upquote}
110
111 \lstset{
112 %language=Bash,                             % Code langugage
113 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
114 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
115 commentstyle=\color{gray},              % Comments font
116 %numbers=left,                           % Line nums position
117 %numberstyle=\tiny,                      % Line-numbers fonts
118 %stepnumber=1,                           % Step between two line-numbers
119 %numbersep=5pt,                          % How far are line-numbers from code
120 backgroundcolor=\color{lightlightgray}, % Choose background color
121 frame=none,                             % A frame around the code
122 tabsize=2,                              % Default tab size
123 captionpos=b,                           % Caption-position = bottom
124 breaklines=true,                        % Automatic line breaking?
125 breakatwhitespace=false,                % Automatic breaks only at whitespace?
126 showspaces=false,                       % Dont make spaces visible
127 showtabs=false,                         % Dont make tabls visible
128 columns=fixed,                          % Column format
129 morekeywords={__global__, __device__},  % 
130 }
131
132
133 %% \todo{} command.
134 %
135 % Outputs red TODOs in the document. Requires \usepackage{color}.
136 %
137 % Usage: \todo{Document the TODO command.}
138 %
139 % Comment out second line to disable.
140 \newcommand{\todo}[1]{}
141 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
142
143
144 %%% Custom sectioning (sectsty package)
145 \usepackage{sectsty}                                                                                                    % Custom sectioning (see below)
146 \allsectionsfont{%                                                                                                                      % Change font of al section commands
147         %\usefont{OT1}{phv}{b}{n}%                                                                              % bch-b-n: CharterBT-Bold font 
148 \bfseries                                                                                                                       % should make it Open Sans Bold
149         }
150
151 \sectionfont{%                                                                                                                          % Change font of \section command
152         %\usefont{OT1}{phv}{b}{n}%                                                                              % bch-b-n: CharterBT-Bold font
153 \bfseries       
154         }
155
156 % use more of the page
157 \usepackage{fullpage}
158
159 %%% Headers and footers
160 \usepackage{fancyhdr}                                                                                           % Needed to define custom headers/footers
161         \pagestyle{fancy}                                                                                                               % Enabling the custom headers/footers
162 \usepackage{lastpage}   
163
164 % Header (empty)
165 \lhead{}
166 \chead{}
167 \rhead{}
168 % Footer (you may change this to your own needs)
169 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
170 \cfoot{}
171 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
172 \renewcommand{\headrulewidth}{0.0pt}
173 \renewcommand{\footrulewidth}{0.4pt}
174
175
176
177 %%% Creating an initial of the very first character of the content
178 \usepackage{lettrine}
179 \newcommand{\initial}[1]{%
180      \lettrine[lines=3,lhang=0.3,nindent=0em]{
181                                 \color{darkblue}
182                                 {\textsf{#1}}}{}}
183
184
185
186 %%% Title, author and date metadata
187 \usepackage{titling}                                                                                                                    % For custom titles
188
189 \newcommand{\HorRule}{\color{darkblue}%                 % Creating a horizontal rule
190                                                                                 \rule{\linewidth}{1pt}%
191                                                                         }
192
193
194 \pretitle{\vspace{-30pt} \begin{flushleft} \HorRule 
195                                 \fontsize{35}{36} \bfseries \color{darkblue} \selectfont 
196                                 }
197                         \title{Applied Crypto Hardening}% \\ \vskip 0.5em \large www.bettercrypto.org}
198 \posttitle{\par\end{flushleft}\vskip 0.5em}
199
200 \preauthor{\begin{flushleft}
201                                         \large \lineskip 0.5em  
202                                         \color{intersectgreen}}
203                                         %\vskip 0.5em
204                                         \author{Wolfgang Breyha, David Durvaux, Tobias Dussa, L. Aaron
205                                         Kaplan, Florian Mendel, Christian Mock, Manuel Koschuch, Adi
206                                         Kriegisch, Ulrich P\"oschl, Ramin Sabet, Berg San, Ralf Schlatterbeck, 
207                                         Thomas Schreck, Aaron Zauner, Pepi Zawodsky}
208 %\institute{
209 %FH Campus Wien
210 %\and
211 %VRVis
212 %\and
213 %CERT.at
214 %\and
215 %Karlsruhe Institute of Technology
216 %}
217
218
219 \setlength{\parindent}{0cm}
220
221 \postauthor{\footnotesize  \color{Black}  \vskip 2.5em
222   (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)
223                                         \par\end{flushleft}\HorRule}
224
225 \date{\today}
226
227 %tell TeX where to look for graphics/logos
228 \graphicspath{ {/img/} }
229
230 % hyperref needs to be the last package you load.
231 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
232
233
234 %%% Begin document
235 \begin{document}
236
237 %\maketitle
238
239
240 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
241 % The first character should be within \initial{}
242 %\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.}
243
244 % new title page
245 \input{./title.tex}
246
247
248
249 \input{neboltai}
250 \input{acknowledgements}
251 \input{abstract}
252 \tableofcontents
253 \chapter{Introduction}
254 \label{chapter:Intro}
255 \input{whoshouldread}
256 \input{related_publications}
257 \input{howtoread}
258 \input{disclaimer}
259 \input{motivation}
260 \input{methods}
261 %%
262 \chapter{Practical recommendations}
263 \label{chapter:PracticalSettings}
264 \input{practical_settings}
265 %%
266 \chapter{Theory}
267 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{-- Leopold Kronecker}
268 \label{chapter:Theory}
269 \input{theory}
270 \chapter{Appendix}
271 \input{tools}
272 \input{links}
273 \input{suggested_reading}
274 \input{cipher_suite_names}
275 \input{further_research}
276 %\input{reviewers}
277 \input{bib}
278
279 \end{document}