Remove all remaining [breaklines] in listings
[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{booktabs}                                                                                           % Nicer tables
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{listings}
38 \usepackage{longtable}
39
40 %% Epigraph patching
41 \usepackage{epigraph}
42 % \epigraphsize{\small}% Default
43 \setlength\epigraphwidth{8cm}
44 \setlength\epigraphrule{0pt}
45 \usepackage{etoolbox}
46 \makeatletter
47 \patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
48 \makeatother
49
50
51
52 \usepackage{gitinfo}
53
54 % custom changes:
55 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
56 \usepackage{placeins}
57 \usepackage{draftwatermark}
58
59 % human tables
60 \usepackage{booktabs}
61 \renewcommand{\arraystretch}{1.25}
62
63 % side box
64 \usepackage{wrapfig}
65 %\usepackage{tcolorbox}
66 \newenvironment{WrapText}[1][r]
67   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
68   {\endtcolorbox\endwrapfigure}
69
70 % Add text symbols
71 \usepackage{pifont}
72 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
73 \newcommand{\no}{\textcolor{red}{\ding{55}}}
74
75 % human tables
76 \usepackage{booktabs}
77
78 \renewcommand{\arraystretch}{1.25}
79
80 \definecolor{green}{RGB}{32,113,10}
81 \definecolor{orange}{RGB}{251,111,16}
82 \definecolor{red}{RGB}{247,56,0}
83 \definecolor{blue}{RGB}{0,28,128}
84 \definecolor{lightgreen}{RGB}{187,218,216}
85 \definecolor{intersectgreen}{RGB}{103,133,155}
86 \definecolor{darkblue}{RGB}{76,87,117}
87
88 \bibliographystyle{alphalink}
89
90 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
91 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
92 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
93 \definecolor{lightlightgray}{gray}{0.9}
94
95 \usepackage{titlesec}
96 %\allsectionsfont{\color{darkblue}\itshape\underline}
97 %\sectionfont{\color{darkblue}\itshape\selectfont}
98 %\subsectionfont{\color{darkblue}\itshape\selectfont}
99 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
100 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
101
102
103 % makes default font sans-serif
104  \renewcommand{\familydefault}{\sfdefault}
105
106 % make font Open Sans
107 % \usepackage{opensans}
108 \usepackage[defaultsans]{opensans}
109
110 % changes font encoding to T1
111 % \usepackage[T1]{fontenc}
112 % \usepackage{textcomp}
113
114 % This block is for listings
115 \usepackage[framemethod=TikZ]{mdframed} % mdframed is used to draw a grey box
116 \mdfdefinestyle{listingstyle}{
117   backgroundcolor=black!10,outerlinewidth=0,outerlinecolor=black,
118   innerleftmargin=0,innerrightmargin=0,innertopmargin=0pt,innerbottommargin=0pt
119 }
120 \usepackage{amssymb}% for \curvearrowright
121 % Insert a grey box behind the listing for uniform background color (The \cipherstring would the listing and the background would turn white)
122 \BeforeBeginEnvironment{lstlisting}{\vspace{0.2cm}\begin{mdframed}[style=listingstyle]}
123 \AfterEndEnvironment{lstlisting}{\end{mdframed}}
124 \lstset{
125 %language=Bash,                             % Code langugage
126 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
127 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
128 commentstyle=\color{gray},              % Comments font
129 %numbers=left,                           % Line nums position
130 %numberstyle=\tiny,                      % Line-numbers fonts
131 %stepnumber=1,                           % Step between two line-numbers
132 %numbersep=5pt,                          % How far are line-numbers from code
133 backgroundcolor=\color{lightlightgray}, % Choose background color
134 frame=none,                             % A frame around the code
135 tabsize=2,                              % Default tab size
136 captionpos=b,                           % Caption-position = bottom
137 breaklines=true,                        % Automatic line breaking?
138 breakatwhitespace=false,                % Automatic breaks only at whitespace?
139 showspaces=false,                       % Dont make spaces visible
140 showstringspaces=false,
141 showtabs=false,                         % Dont make tabls visible
142 columns=fullflexible,                   % Column format: no spaces are inserted for monospaced appearance
143 morekeywords={__global__, __device__},  % 
144 escapeinside={\%*}{*)},                 % Escape TeX commands inside %* and *)
145 prebreak=\mbox{$\curvearrowright$},     % Disply curved arrow before linebreak
146 xrightmargin=1.8pt,
147 }
148
149
150 %% \todo{} command.
151 %
152 % Outputs red TODOs in the document. Requires \usepackage{color}.
153 %
154 % Usage: \todo{Document the TODO command.}
155 %
156 % Comment out second line to disable.
157 \newcommand{\todo}[1]{}
158 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
159
160
161 %%% Custom sectioning (sectsty package)
162 \usepackage{sectsty}                                                                                                    % Custom sectioning (see below)
163 \allsectionsfont{%                                                                                                                      % Change font of al section commands
164         \usefont{OT1}{phv}{b}{n}%                                                                               % bch-b-n: CharterBT-Bold font
165         }
166
167 \sectionfont{%                                                                                                                          % Change font of \section command
168         \usefont{OT1}{phv}{b}{n}%                                                                               % bch-b-n: CharterBT-Bold font
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{36}{36}  \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  \color{intersectgreen}}
217
218                                         \author{Wolfgang Breyha, David Durvaux, Tobias Dussa, L. Aaron
219                                         Kaplan, Florian Mendel, Christian Mock, Manuel Koschuch, Adi
220                                         Kriegisch, Ulrich P\"oschl, Ramin Sabet, Berg San, Ralf Schlatterbeck, 
221                                         Thomas Schreck, Aaron Zauner, Pepi Zawodsky}
222 %\institute{
223 %FH Campus Wien
224 %\and
225 %VRVis
226 %\and
227 %CERT.at
228 %\and
229 %Karlsruhe Institute of Technology
230 %}
231
232
233 \setlength{\parindent}{0cm}
234
235 \postauthor{\footnotesize  \color{Black} 
236 \\ \vskip 0.5em  (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)
237                                         \par\end{flushleft}\HorRule}
238
239 \date{\today}
240
241 % hyperref needs to be the last package you load.
242 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
243
244 % CIPHERSTRING
245 \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?
246 \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}}
247
248 %%% Begin document
249 \begin{document}
250 \maketitle
251
252 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
253 % The first character should be within \initial{}
254 %\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.}
255
256 \input{neboltai}
257 \input{acknowledgements}
258 \input{abstract}
259 \tableofcontents
260 \chapter{Introduction}
261 \label{chapter:Intro}
262 \input{whoshouldread}
263 \input{related_publications}
264 \input{howtoread}
265 \input{disclaimer}
266 \input{motivation}
267 \input{methods}
268 %%
269 \chapter{Practical recommendations}
270 \label{chapter:PracticalSettings}
271 \input{practical_settings}
272 %%
273 \chapter{Theory}
274 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{-- Leopold Kronecker}
275 \label{chapter:Theory}
276 \input{theory}
277 \chapter{Appendix}
278 \input{tools}
279 \input{links}
280 \input{suggested_reading}
281 \input{cipher_suite_names}
282 \input{further_research}
283 %\input{reviewers}
284 \input{bib}
285
286 \end{document}