-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlecture_notes.tex
342 lines (274 loc) · 12.6 KB
/
lecture_notes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
%#####################################################################
% Document
%#####################################################################
%#####################################################################
% LaTeX starts
%#####################################################################
\documentclass[draft=false, % draft modus (true,false)
paper=a4, % paper size (print space)
fontsize=11pt, % font size (10pt,11pt,12pt)
headings=big,
twocolumn=false, % text columns per page (true,false)
twoside, % text side layout (oneside,twoside)
openright, % start chapter (openright,openany)
chapterprefix, % two lines chapters 'Chapter x\\ Name'
cleardoublepage=plain, % new (twoside) page (empty,plain,standard)
parskip=false,
numbers=noenddot % configure \parindent and \parskip
]{scrbook}
%\documentclass[a4paper,12pt,twoside,openany,headsepline,bibliography=totocnumbered]{scrbook}
%%% HAS TO BE HERE FOR TIKZ %%%
\usepackage{etex}
% *************************************************************
% packages (really needed ones only)
%% A
\usepackage[printonlyused]{acronym} % abbreviations
\usepackage{adjustbox}
\usepackage{algorithm} % algorithms
\usepackage{algpseudocode} % algorithms
\usepackage{amssymb} % misc extra (math) symbols
\usepackage{amsthm}
%% B
\usepackage[ngerman,american]{babel} % US English terms and hyphenations
\usepackage{booktabs} % Nice table stuff like \toprule
%% C
\usepackage{color}
\usepackage{colortbl}
%% D
%% E
\usepackage{enumitem} % Control over lists
\usepackage{extarrows} % Long arrows
%% F
\usepackage{fancyhdr} % custom headers & footers
\usepackage{float}
\usepackage{footmisc} % Labels in footnotes
%\usepackage[T1]{fontenc} % force T1 vector font encoding
\usepackage{framed}
\usepackage[in,headings]{fullpage} % 1 inch margins, header & footers, centering
%% G
\usepackage{graphicx} % graphic stuff
%% H
\usepackage{here}
\usepackage[pdftitle={David Oswald -- Hardware and Embedded Systems Security},pdfsubject={Hardware and Embedded Systems Security}, pdfauthor={David Oswald}, pdfkeywords={Keywords}, pdfdisplaydoctitle=true, linktocpage=true, bookmarksnumbered=true, colorlinks=false, linkcolor=blue, citecolor=blue, anchorcolor=blue, pdfpagelayout=TwoPageRight, bookmarksopen=true, bookmarksopenlevel=0]{hyperref}
%% Cleveref must be loaded after hyperref
\usepackage{cleveref}
%% I
\usepackage[utf8]{inputenc} % allow direct input of umlaute etc.
%% J
%% K
%% L
% \usepackage{l3backend}
\usepackage{listings} % sophisticated source code listings
\usepackage{lmodern} % better fonts
\usepackage{longtable} % multi-page tables
%% M
\usepackage{makeidx} % enable indexing (cf. \makeindex)
%\usepackage[k-loose,nohints]{minitoc} % mini tocs per chapter
\usepackage{multirow} % For multiple rows in tables
%% N
\usepackage{nopageno} % disable auto page numbering
\usepackage{nicefrac} % smaller fraction symbol
%% O
%% P
\usepackage{placeins} % for \FloatBarrier
\usepackage{protocol} % for typesetting protocols
\usepackage{pstricks}
\usepackage{pst-all}
%% Q
%% R
%% S
\usepackage{subfig} % For \subfloat
%% T
\usepackage{tabularx} % Better tables
\usepackage{textcomp} % Fix pound problem
\usepackage{tikz} % Drawings
%% U
\usepackage{upgreek} % ``Unmathematical'' greek symbols eg. for units
\usepackage{url} % URL handling (style & line breaks)
%% V
%% W
%% X
%% Y
%% Z
%%% Need all libs here
\usetikzlibrary{shapes,arrows,calc}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning}
\usetikzlibrary{matrix}
% Links
\hypersetup{
colorlinks,
linkcolor={red!30!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
%#####################################################################
% Layout customization
%#####################################################################
% spacing between headline and text
\setlength{\headsep}{20pt}
% line spacing (don't use \baselinestretch)
%\linespread{1.1}
% flexible extra vertical space between paragraphs (default +0.5 -0.25)
%\setlength{\parskip}{1ex plus0.5ex minus0.25ex}
% maximum fraction of a page for floats before creating a new page
\renewcommand{\floatpagefraction}{0.75} % (default = 0.5)
% minimum fraction of a page for text (default = 0.2)
%\renewcommand{\textfraction}{0.2}
% penalties to prevent 'Hurenkinder' and 'Schusterjungen'
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
% penalty for word spacing vs. overlapping words
\tolerance = 500
% makes all text pages the same height, by adding
% extra vertical space when necessary (book default)
\flushbottom % \raggedbottom (no extra vertical space)
% center chapter headings
\addtokomafont{chapter}{\renewcommand*{\raggedsection}{\centering}}
% Try to fix PDF graphics CMYK<->RGB bug on MAC
%\pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}
% define some own fonts
\newcommand{\subtitlefnt}{\fontfamily{ppl}\fontshape{sl}\fontseries{m}\fontsize{13}{16}\selectfont}
% define fancy page style
\pagestyle{fancy}
% define page headings
\fancyhead{} % clear previous
\fancyhead[LE]{\textsf{\nouppercase{\leftmark}}}
\fancyhead[RO]{\textsf{\nouppercase{\rightmark}}}
\renewcommand{\headrulewidth}{0.5pt}
% define page footers
\fancyfoot{} % clear previous
\fancyfoot[EL,OR]{\textsf{\thepage}}
\fancyfoot[ER,OL]{}
% define some custom colors
\definecolor{itemcolor}{rgb}{0.3,0.3,0.3}
% use different itemize bullets (first & second level)
\renewcommand{\labelitemi}{\graybox}
\renewcommand{\labelitemii}{\whitebox}
% use different enumerate (first & second level), e.g., R/roman, Arabic,
\renewcommand{\labelenumi}{(\arabic{enumi})}
\renewcommand{\labelenumii}{\alph{enumii})}
\newtheorem{definition}{Definition}
%#####################################################################
% Custom settings, commands & macros
%#####################################################################
\input{chapters/commands}
% custom hyphenations
\hyphenation{}
% set babel default language
\selectlanguage{american}
% build index
\makeindex
%#####################################################################
% Title page
%#####################################################################
% title
\title{
%\fontfamily{ppl}\fontshape{sc}\fontseries{m}\fontsize{16}{24}\selectfont
Lecture Notes:\\
Hardware and Embedded Systems Security
%\vspace*{0.75ex}
%\fontfamily{ppl}\fontshape{sl}\fontseries{m}\fontsize{16}{18}\selectfont
%\vspace*{4ex}
}
% author
\author{David Oswald}
% date
\date{\today}
%---------------------------------------------------------------------
% initialize document
%---------------------------------------------------------------------
\begin{document}
%%% Mark standard abbreviations as used
\acused{DES}
\acused{3DES}
\acused{AES}
\acused{RSA}
\acused{USB}
\acused{PC}
\acused{SHA}
\acused{SHA-1}
\acused{CPU}
\acused{VHDL}
\acused{EEPROM}
\acused{MOSFET}
% roman page numbering until actual text starts
\pagenumbering{roman}
% build title
\maketitle
%#####################################################################
% Abstract
%#####################################################################
%\input{chapters/abstract}
%#####################################################################
% Acks
%#####################################################################
% \input{chapters/acknowledgments}
%#####################################################################
% Table of Contents
%#####################################################################
\def\contentsname{Table of Contents}
\tableofcontents
% additional blank page
\cleardoublepage
\chapter*{General Remarks}
\section*{Notation}
Notation and symbols are (should be) consistent within one chapter. However, between chapters, the notation may change (e.g., $n$ could both refer to the block size of a block cipher and the \ac{RSA} modulus. Some symbols should be consistent throughout the document, for example $p$ for plaintext, $c$ for ciphertext, and $k$ for the key, unless explicitly re-defined for a chapter or section.
Byte and bit indices are counted from zero, i.e., the \ac{LSB} in the \ac{LSByte} is byte~0, bit~0. In binary notation (e.g., $19_{10} = \left(10011\right)_2$), the \ac{LSB} is at the right.
\section*{Bug Reports}
If you find a problem, bug, or error, please let me know (include the page number and a brief description): \href{mailto:d.f.oswald@cs.bham.ac.uk}{d.f.oswald@cs.bham.ac.uk}---thanks! You can also submit a pull request on the lecture notes repo at \url{https://github.com/david-oswald/hwsec_lecture_notes}.
\section*{Licensing}
These lectures notes are under the Creative Commons ``Attribution-ShareAlike 3.0 Unported'' (\texttt{CC BY-SA 3.0}) license. See \url{https://creativecommons.org/licenses/by-sa/3.0/} for details. This means that ou are free to:
\begin{description}
\item[Share] Copy and redistribute the material in any medium or format.
\item[Adapt] Remix, transform, and build upon the material for any purpose, even commercially.
\end{description}
\noindent Under the following terms:
\begin{description}
\item[Attribution] You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
\item[ShareAlike] If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
\end{description}
% from here arabic page numbering
\pagenumbering{arabic}
%#####################################################################
% Chapter: Introduction
%#####################################################################
\input{chapters/intro}
%#####################################################################
% Chapter: Symm. crypto
%#####################################################################
\input{chapters/symmetric_crypto}
%#####################################################################
% Chapter: Asymm. crypto
%#####################################################################
\input{chapters/asymmetric_crypto}
%#####################################################################
% Chapter: Impl. attacks
%#####################################################################
\input{chapters/impl_attacks}
%#####################################################################
% Bibliography
%#####################################################################
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{alpha} % plain or alpha
\bibliography{literature}
%#####################################################################
% List of Abbreviations
%#####################################################################
\addcontentsline{toc}{chapter}{List of Abbreviations}
\input{chapters/acronyms}
%#####################################################################
% List of Figures
%#####################################################################
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
%#####################################################################
% List of Tables
%#####################################################################
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
%#####################################################################
% LaTeX ends
%#####################################################################
\end{document}