c8998a55e95479e0482611c0dcb172ca06ae8432
[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[ DIV=calc,%
16                                 paper=a4,%
17                                 fontsize=9pt,%
18                                 %onecolumn]{scrartcl}                                           % KOMA-article class
19                                 onecolumn]{scrreprt}                                            % KOMA-article class
20                                 %onecolumn]{report}                                             % KOMA-article class
21
22
23 \usepackage[utf8]{inputenc}
24
25 \usepackage[english]{babel}                                                                             % English language/hyphenation
26 \usepackage[final,babel=true]{microtype}[2011/08/18]
27 \usepackage{amsmath,amsfonts,amsthm}                                    % Math packages
28 \usepackage{graphicx}
29 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
30 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
31 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
32 \usepackage{subfig}                                                                                                     % Subfigures
33
34 \usepackage[usenames,dvipsnames]{color}
35 \usepackage{float}
36 \usepackage{subfig}
37 %\usepackage{tikz}
38 \usepackage{acronym}
39 \usepackage{amsthm}
40 \usepackage{fancyvrb}
41 \usepackage{listings}
42 \usepackage{longtable}
43
44 % Epigraph / dictum
45 \renewcommand*{\dictumrule}{}
46 \renewcommand*{\dictumauthorformat}[1]{--- #1}
47 \newcommand*{\epigraph}[3][]{\dictum[#3]{#2}\bigskip}
48 \addtokomafont{dictumtext}{\itshape}
49 \setkomafont{dictumauthor}{\normalfont}
50 \renewcommand{\dictumwidth}{8cm}
51
52
53
54 \usepackage{gitinfo}
55
56 % custom changes:
57 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
58 \usepackage{placeins}
59 \usepackage{draftwatermark}
60
61 % human tables
62 \usepackage{booktabs}
63 \renewcommand{\arraystretch}{1.25}
64
65 % side box
66 \usepackage{wrapfig}
67 %\usepackage{tcolorbox}
68 \newenvironment{WrapText}[1][r]
69   {\wrapfigure{#1}{0.5\textwidth}\tcolorbox}
70   {\endtcolorbox\endwrapfigure}
71
72 % Add text symbols
73 \usepackage{pifont}
74 \newcommand{\yes}{\textcolor{green}{\ding{51}}}
75 \newcommand{\no}{\textcolor{red}{\ding{55}}}
76
77
78 % Colours
79 \definecolor{green}{RGB}{32,113,10}
80 \definecolor{orange}{RGB}{251,111,16}
81 \definecolor{red}{RGB}{247,56,0}
82 \definecolor{blue}{RGB}{0,28,128}
83 \definecolor{lightgreen}{RGB}{187,218,216}
84 \definecolor{intersectgreen}{RGB}{103,133,155}
85 \definecolor{darkblue}{RGB}{76,87,117}
86
87 \bibliographystyle{alphalink}
88
89 \definecolor{Brown}{cmyk}{0,0.81,1,0.60}
90 \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40}
91 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
92 \definecolor{lightlightgray}{gray}{0.9}
93
94 \usepackage{titlesec}
95 %\allsectionsfont{\color{darkblue}\itshape\underline}
96 %\sectionfont{\color{darkblue}\itshape\selectfont}
97 %\subsectionfont{\color{darkblue}\itshape\selectfont}
98 \renewcommand*\sectfont{\sffamily\color{darkblue}\mdseries}
99 %\renewcommand*\sectfont{\rmfamily\mdseries\itshape}
100
101
102 % changes font encoding to T1
103 \usepackage[T1]{fontenc}
104 \usepackage{textcomp}
105 % For searchable pdfs
106 \input glyphtounicode
107 \pdfgentounicode=1
108
109 % make font Open Sans
110 \usepackage[defaultsans]{opensans}
111
112 % makes default font sans-serif
113  \renewcommand{\familydefault}{\sfdefault}
114
115 %
116 % Fonts are loaded, now is the right time for mictorype.
117 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
118
119
120 \lstset{
121 %language=Bash,                             % Code langugage
122 basicstyle=\ttfamily,                   % Code font, Examples: \footnotesize, \ttfamily
123 keywordstyle=\color{OliveGreen},        % Keywords font ('*' = uppercase)
124 commentstyle=\color{gray},              % Comments font
125 %numbers=left,                           % Line nums position
126 %numberstyle=\tiny,                      % Line-numbers fonts
127 %stepnumber=1,                           % Step between two line-numbers
128 %numbersep=5pt,                          % How far are line-numbers from code
129 backgroundcolor=\color{lightlightgray}, % Choose background color
130 frame=none,                             % A frame around the code
131 tabsize=2,                              % Default tab size
132 captionpos=b,                           % Caption-position = bottom
133 breaklines=true,                        % Automatic line breaking?
134 breakatwhitespace=false,                % Automatic breaks only at whitespace?
135 showspaces=false,                       % Dont make spaces visible
136 showtabs=false,                         % Dont make tabls visible
137 columns=fixed,                          % Column format
138 morekeywords={__global__, __device__},  % 
139 }
140
141
142 %% \todo{} command.
143 % Outputs red TODOs in the document. Requires \usepackage{color}.
144 % Usage: \todo{Document the TODO command.}
145 % Comment out second line to disable.
146 \newcommand{\todo}[1]{}
147 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
148
149
150 %%% Custom sectioning (sectsty package)
151 \usepackage{sectsty}    
152 \allsectionsfont{\bfseries}
153 \sectionfont{\bfseries}
154
155 % use more of the page
156 \usepackage{fullpage}
157
158 %%% Headers and footers
159 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
160         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
161 \usepackage{lastpage}   
162
163 % Header (empty)
164 \lhead{}
165 \chead{}
166 \rhead{}
167 % Footer (you may change this to your own needs)
168 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
169 \cfoot{}
170 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
171 \renewcommand{\headrulewidth}{0.0pt}
172 \renewcommand{\footrulewidth}{0.4pt}
173
174
175 % customized spaces between text and footnotes
176 \setlength{\skip\footins}{3\baselineskip}
177
178
179 %%% Creating an initial of the very first character of the content
180 \usepackage{lettrine}
181 \newcommand{\initial}[1]{%
182      \lettrine[lines=3,lhang=0.3,nindent=0em]{
183                                 \color{darkblue}
184                                 {\textsf{#1}}}{}}
185
186 %%% Title, author and date metadata
187 \usepackage{titling}                                                                                            % For custom titles
188
189 %defines horizontal rule for title
190 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
191
192 % no indent on first line of a paragraph
193 \setlength{\parindent}{0cm}
194
195 %tell TeX where to look for graphics/logos
196 \graphicspath{ {/img/} }
197
198 % hyperref needs to be the last package you load.
199 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
200
201 % Package to create dummy text
202 \usepackage{blindtext}
203
204
205 %%% Begin document
206 \begin{document}
207
208 %\maketitle
209
210
211 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
212 % The first character should be within \initial{}
213 %\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.}
214
215 % new title page
216 \input{./title.tex}
217
218
219
220 \input{neboltai}
221 \input{acknowledgements}
222 \input{abstract}
223 \tableofcontents
224 \chapter{Introduction}
225 \label{chapter:Intro}
226 \input{whoshouldread}
227 \input{related_publications}
228 \input{howtoread}
229 \input{disclaimer}
230 \input{motivation}
231 \input{methods}
232 %%
233 \chapter{Practical recommendations}
234 \label{chapter:PracticalSettings}
235 \input{practical_settings}
236 %%
237 \chapter{Theory}
238 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
239 \label{chapter:Theory}
240 \input{theory}
241 \chapter{Appendix}
242 \input{tools}
243 \input{links}
244 \input{suggested_reading}
245 \input{cipher_suite_names}
246 \input{further_research}
247 %\input{reviewers}
248 \input{bib}
249
250 \end{document}
251 %%% Local Variables: 
252 %%% mode: latex
253 %%% TeX-master: t
254 %%% End: