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