585953cd54eb0b00e9bd718921791006211795d2
[ach-master.git] / src / applied-crypto-hardening.tex
1 %%%
2 %%% Applied Crypto Hardening
3 %%% bettercrypto.org
4 %%%
5 %%%% Based on:
6 %%% LaTeX Template: Two column article
7 %%%
8 %%% Source: http://www.howtotex.com/
9 %%% Feel free to distribute this template, but please keep to referal to http://www.howtotex.com/ here.
10 %%% Date: February 2011
11 %%%%
12
13 %%% Preamble
14 \RequirePackage{fix-cm}
15 \documentclass{scrreprt}
16 \usepackage[utf8]{inputenc}
17 % changes font encoding to T1
18 \usepackage[T1]{fontenc}
19 \usepackage{textcomp}
20 % For searchable pdfs
21 \input glyphtounicode
22 \pdfgentounicode=1
23 \usepackage{fixltx2e}
24
25 \KOMAoptions{paper=a4%
26   ,fontsize=10pt%
27   ,DIV=12%
28   ,parskip=true%
29 }
30
31
32 \usepackage[english]{babel}
33 \usepackage[final,babel=true]{microtype}[2011/08/18]
34 \usepackage{graphicx}
35 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}
36 \usepackage{epstopdf}
37 \usepackage{subfig}
38
39 \usepackage[usenames,dvipsnames]{color}
40 \usepackage{float}
41 \usepackage{subfig}
42 \usepackage{acronym}
43 \usepackage{fancyvrb}
44 \usepackage{listings}
45 \usepackage{longtable}
46
47 % Epigraph / dictum
48 \renewcommand*{\dictumrule}{}
49 \renewcommand*{\dictumauthorformat}[1]{--- #1}
50 \newcommand*{\epigraph}[3][]{\dictum[#3]{#2}\bigskip}
51 \addtokomafont{dictumtext}{\itshape}
52 \setkomafont{dictumauthor}{\normalfont}
53 \renewcommand{\dictumwidth}{8cm}
54
55 \usepackage{gitinfo}
56
57 % custom changes:
58 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
59 \usepackage{placeins}
60 \usepackage{draftwatermark}
61
62 % human tables
63 \usepackage{booktabs}
64 \renewcommand{\arraystretch}{1.25}
65
66 % side box
67 \usepackage{wrapfig}
68 %\usepackage{tcolorbox}
69 \newenvironment{WrapText}[1][r]
70   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
71   {\endtcolorbox\endwrapfigure}
72
73 % Add text symbols
74 \usepackage{pifont}
75 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
76 \newcommand{\no}{\textcolor{red}{\ding{55}}}
77
78
79 % Colours
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
96 % make font Open Sans
97 \usepackage[defaultsans]{opensans}
98
99 % makes default font sans-serif
100  \renewcommand{\familydefault}{\sfdefault}
101
102 %
103 % Fonts are loaded, now is the right time for mictorype.
104 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
105
106
107 \lstset{
108 %language=Bash,                             % Code langugage
109 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
110 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
111 commentstyle=\color{gray},              % Comments font
112 %numbers=left,                           % Line nums position
113 %numberstyle=\tiny,                      % Line-numbers fonts
114 %stepnumber=1,                           % Step between two line-numbers
115 %numbersep=5pt,                          % How far are line-numbers from code
116 backgroundcolor=\color{lightlightgray}, % Choose background color
117 frame=none,                             % A frame around the code
118 tabsize=2,                              % Default tab size
119 captionpos=b,                           % Caption-position = bottom
120 breaklines=true,                        % Automatic line breaking?
121 breakatwhitespace=false,                % Automatic breaks only at whitespace?
122 showspaces=false,                       % Dont make spaces visible
123 showtabs=false,                         % Dont make tabls visible
124 columns=fixed,                          % Column format
125 morekeywords={__global__, __device__},  % 
126 }
127
128
129 %% \todo{} command.
130 % Outputs red TODOs in the document. Requires \usepackage{color}.
131 % Usage: \todo{Document the TODO command.}
132 % Comment out second line to disable.
133 \newcommand{\todo}[1]{}
134 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
135
136 \addtokomafont{disposition}{\color{darkblue}\bfseries}
137 % use more of the page
138 %\usepackage{fullpage}
139
140 % Detect if we can use the brand new scrlayer
141 % else use the good old scrpage2
142 \newif\ifscrlayer
143 {\def\tempa#1 v#2 #3!{\ifdim #2pt>3.11pt\relax \global\scrlayertrue\else \scrlayerfalse\fi}
144 \expandafter\tempa\KOMAScriptVersion!}
145 \ifscrlayer
146 \usepackage[footsepline]{scrlayer-scrpage}
147 \else
148 \usepackage[footsepline]{scrpage2}
149 \fi
150
151 \usepackage{lastpage}
152
153 \ifoot%
154 [{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}]%
155 {{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}}
156 \cfoot[]{}
157 \ofoot%
158 [{\footnotesize page \thepage\ of \pageref{LastPage}}]%
159 {{\footnotesize page \thepage\ of \pageref{LastPage}}}
160
161 % Creating a horizontal rule
162 \newcommand{\HorRule}{\color{darkblue}%
163   \rule{\linewidth}{1pt}%
164 }
165
166 \date{\today}
167
168 %tell TeX where to look for graphics/logos
169 \graphicspath{ {/img/} }
170
171 % hyperref needs to be the last package you load.
172 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
173
174 % Package to create dummy text
175 \usepackage{blindtext}
176 % debug page layout
177 %\usepackage{showframe}
178
179 %%% Begin document
180 \begin{document}
181
182 %\maketitle
183 \pagestyle{scrheadings}
184 % new title page
185 \input{title.tex}
186
187
188
189 \input{neboltai}
190 \input{acknowledgements}
191 \input{abstract}
192 \tableofcontents
193 \chapter{Introduction}
194 \label{chapter:Intro}
195 \input{whoshouldread}
196 \input{related_publications}
197 \input{howtoread}
198 \input{disclaimer}
199 \input{motivation}
200 \input{methods}
201 %%
202 \chapter{Practical recommendations}
203 \label{chapter:PracticalSettings}
204 \input{practical_settings}
205 %%
206 \chapter{Theory}
207 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
208 \label{chapter:Theory}
209 \input{theory}
210 \chapter{Appendix}
211 \input{tools}
212 \input{links}
213 \input{suggested_reading}
214 \input{cipher_suite_names}
215 \input{further_research}
216 %\input{reviewers}
217 \input{bib}
218
219 \end{document}
220 %%% Local Variables: 
221 %%% mode: latex
222 %%% TeX-master: t
223 %%% End: