208e1e93c839c588bd046df1b32478ffb86a767d
[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{graphicx}
28 %\usepackage[svgnames]{xcolor}                                                                  % Enabling colors by their 'svgnames'
29 \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}        % Custom captions under/above floats
30 \usepackage{epstopdf}                                                                                           % Converts .eps to .pdf
31 \usepackage{subfig}                                                                                                     % Subfigures
32
33 \usepackage[usenames,dvipsnames]{color}
34 \usepackage{float}
35 \usepackage{subfig}
36 %\usepackage{tikz}
37 \usepackage{acronym}
38 \usepackage{amsthm}
39 \usepackage{fancyvrb}
40 \usepackage{listings}
41 \usepackage{longtable}
42
43 % Epigraph / dictum
44 \renewcommand*{\dictumrule}{}
45 \renewcommand*{\dictumauthorformat}[1]{--- #1}
46 \newcommand*{\epigraph}[3][]{\dictum[#3]{#2}\bigskip}
47 \addtokomafont{dictumtext}{\itshape}
48 \setkomafont{dictumauthor}{\normalfont}
49 \renewcommand{\dictumwidth}{8cm}
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 % changes font encoding to T1
94 \usepackage[T1]{fontenc}
95 \usepackage{textcomp}
96 % For searchable pdfs
97 \input glyphtounicode
98 \pdfgentounicode=1
99
100 % make font Open Sans
101 \usepackage[defaultsans]{opensans}
102
103 % makes default font sans-serif
104  \renewcommand{\familydefault}{\sfdefault}
105
106 %
107 % Fonts are loaded, now is the right time for mictorype.
108 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
109
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 % Outputs red TODOs in the document. Requires \usepackage{color}.
135 % Usage: \todo{Document the TODO command.}
136 % Comment out second line to disable.
137 \newcommand{\todo}[1]{}
138 \renewcommand{\todo}[1]{{\color{Red} TODO: {#1}}}
139
140 \addtokomafont{disposition}{\color{darkblue}\bfseries}
141 % use more of the page
142 \usepackage{fullpage}
143
144 %%% Headers and footers
145 \usepackage{fancyhdr}                                                           % Needed to define custom headers/footers
146         \pagestyle{fancy}                                                               % Enabling the custom headers/footers
147 \usepackage{lastpage}   
148
149 % Header (empty)
150 \lhead{}
151 \chead{}
152 \rhead{}
153 % Footer (you may change this to your own needs)
154 \lfoot{\footnotesize Applied Crypto Hardening \textbullet ~Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
155 \cfoot{}
156 \rfoot{\footnotesize page \thepage\ of \pageref{LastPage}}      % "Page 1 of 2"
157 \renewcommand{\headrulewidth}{0.0pt}
158 \renewcommand{\footrulewidth}{0.4pt}
159
160
161 % customized spaces between text and footnotes
162 \setlength{\skip\footins}{3\baselineskip}
163
164
165 %%% Creating an initial of the very first character of the content
166 \usepackage{lettrine}
167 \newcommand{\initial}[1]{%
168      \lettrine[lines=3,lhang=0.3,nindent=0em]{
169                                 \color{darkblue}
170                                 {\textsf{#1}}}{}}
171
172 %%% Title, author and date metadata
173 \usepackage{titling}                                                                                            % For custom titles
174
175 %defines horizontal rule for title
176 \newcommand{\HorRule}{\color{darkblue}\rule{\linewidth}{1pt}}
177
178 % no indent on first line of a paragraph
179 \setlength{\parindent}{0cm}
180
181 %tell TeX where to look for graphics/logos
182 \graphicspath{ {/img/} }
183
184 % hyperref needs to be the last package you load.
185 \usepackage[pdftex,breaklinks,colorlinks,linkcolor=darkblue,citecolor=blue,urlcolor=blue]{hyperref}
186
187 % Package to create dummy text
188 \usepackage{blindtext}
189
190
191 %%% Begin document
192 \begin{document}
193
194 %\maketitle
195
196
197 \thispagestyle{fancy}                   % Enabling the custom headers/footers for the first page 
198 % The first character should be within \initial{}
199 %\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.}
200
201 % new title page
202 \input{./title.tex}
203
204
205
206 \input{neboltai}
207 \input{acknowledgements}
208 \input{abstract}
209 \tableofcontents
210 \chapter{Introduction}
211 \label{chapter:Intro}
212 \input{whoshouldread}
213 \input{related_publications}
214 \input{howtoread}
215 \input{disclaimer}
216 \input{motivation}
217 \input{methods}
218 %%
219 \chapter{Practical recommendations}
220 \label{chapter:PracticalSettings}
221 \input{practical_settings}
222 %%
223 \chapter{Theory}
224 %\epigraph{``Number theorists are like lotus-eaters - having tasted this food they can never give it up.''}{Leopold Kronecker}
225 \label{chapter:Theory}
226 \input{theory}
227 \chapter{Appendix}
228 \input{tools}
229 \input{links}
230 \input{suggested_reading}
231 \input{cipher_suite_names}
232 \input{further_research}
233 %\input{reviewers}
234 \input{bib}
235
236 \end{document}
237 %%% Local Variables: 
238 %%% mode: latex
239 %%% TeX-master: t
240 %%% End: