Initialize paper tex

This commit is contained in:
jaseg 2021-04-09 19:02:15 +02:00
parent e87677ca40
commit f6e5759be5
14 changed files with 8756 additions and 1 deletions

2727
paper/CC-by.eps Normal file

File diff suppressed because one or more lines are too long

BIN
paper/CC-by.pdf Normal file

Binary file not shown.

32
paper/Makefile Normal file
View file

@ -0,0 +1,32 @@
LAB_PATH ?= ../lab-windows
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
main_tex ?= safety-reset-paper
VERSION_STRING := $(shell git describe --tags --long --dirty)
all: ${main_tex}.pdf
%.pdf: %.tex safety-reset.bib version.tex
pdflatex -shell-escape $<
biber $*
pdflatex -shell-escape $<
version.tex: ${main_tex}.tex safety-reset.bib
echo "${VERSION_STRING}" > $@
resources/%.pdf: $(LAB_PATH)/%.ipynb
jupyter-nbconvert --to=pdf --output-dir=resources --output=$* --LatexExporter.template_file=resources/nbexport.tplx $^
.PHONY: clean
clean:
rm -f ${main_tex}.aux ${main_tex}.bbl ${main_tex}.bcf ${main_tex}.log ${main_tex}.blg
rm -f ${main_tex}.out ${main_tex}.run.xml texput.log

BIN
paper/iacrdoc.pdf Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

Binary file not shown.

View file

@ -0,0 +1,371 @@
% IACR Transactions CLASS DOCUMENTATION -- version 0.24 (26 August 2016)
% Written by Gaetan Leurent gaetan.leurent@inria.fr (2016)
%
% To the extent possible under law, the author(s) have dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.
\documentclass[preprint]{iacrtrans}
\usepackage[utf8]{inputenc}
\author{Gaëtan Leurent\inst{1} \and Alice\inst{2} \and Bob\inst{2}}
\institute{Inria, France, \email{gaetan.leurent@inria.fr} \and ACME}
\title[\texttt{iacrtans} class documentation]{\publname}
\subtitle{\LaTeX{} Class Documentation (v. 0.24)}
\begin{document}
\maketitle
% use optional argument because the \LaTeX command breaks the PDF keywords
\keywords[\publname, TCHES, LaTeX]{\publname \and TCHES \and \LaTeX}
\begin{abstract}
This document is a quick introduction to the \LaTeX{} class for the
\publname{}.
\end{abstract}
\section*{Introduction}
The \texttt{iacrtans} \LaTeX{} class will be used by the new
``\publname'' journal. The class is based on standard \LaTeX{}
classes and packages (mainly the \texttt{article} class with
\texttt{amsmath}), and should be similar in use to the \texttt{llncs}
class used for Springer's proceedings. The \LaTeX{} source of this
documentation is meant as an example to show basic usage of the class.
Since we are now preparing the zero-th issue of the journal, the class
is still in development and feedback and comments are welcome.
\subsection*{\textcolor{red!70!black}{FAQ:} Converting \texttt{llncs} papers to \texttt{iacrtrans}}
If you have a paper typeset with the \texttt{llncs} class, conversion
should be relatively easy. The following steps should be sufficient
in most cases (for the submission version):
\begin{enumerate}
\item Replace \verb+\documentclass{llncs}+ with\\ \verb+\documentclass[submission,spthm]{iacrtrans}+;
\item Replace \verb+\bibliographystyle{splncs03}+ with
\verb+\bibliographystyle{alpha}+;
\item Add a \verb+\keywords{}+ command before the abstract, with
keywords separated by \verb+\and+;
\item Remove commands that might override the class style, such as
\verb+\pagestyle{...}+ or \verb+\thispagestyle{...}+,
change of margins (\emph{e.g.} with the \texttt{geometry} package),
change of fonts, ....
\item See also \autoref{sec:biblio} for information about how to
typeset the bibliography.
\end{enumerate}
\section{Main Commands}
\subsection{Title page}
The following commands are used to input informations for the title page.
\paragraph{\texttt{\textbackslash title}} to define the title.
A shorter running title can be given as optional argument.
\paragraph{\texttt{\textbackslash subtitle}} to give an optional
subtitle.
\paragraph{\texttt{\textbackslash author}} to define the author list.
Author names must be delimited by \verb+\and+ macros. If there is one
different affiliation for each author, authors and affiliations will be
numbered automatically. Otherwise, each author name must be followed by
\verb+\inst{...}+ with the corresponding affiliation(s).
A shorter list of authors for the running head can be given as
optional argument.
\paragraph{\texttt{\textbackslash institute}} to give author's affiliation(s).
If there are several affiliations, they must be separated by
\verb+\and+ macros, and will be numbered automatically.
\paragraph{\texttt{\textbackslash keywords}} to give a list of
keywords.
Individual keywords should be separated by the \verb+\and+ macro.
If there are fragile commands in the keywords, use the optional argument
to give a text-only version of the keywords; this will be used for the
PDF meta-data.
\paragraph{\texttt{\textbackslash email}} should be used inside the
\verb+\institute+ argument to typeset author's email address(es). An
optional argument can be given for the hyperlink, if different from the
displayed email. For instance, you can group emails as follows:\\
\verb+\email[alice@foo.com,bob@bob.com]{{alice,bob}@foo.com}+
\paragraph{\texttt{\textbackslash thanks}}
can be used inside the \verb+\title+,
\verb+\author+ or \verb+\institute+ argument to generate a footnote with additional
information, if needed.
\paragraph{\texttt{\textbackslash maketitle}} is used to actually
typeset the title.
\paragraph{The \texttt{abstract} environment} should be used to typeset the abstract.
Note that the keywords should be given before starting the abstract environment.
\subsection{Theorems}
The \texttt{iacrtrans} class uses the \AmS{} packages to typeset
math. In particular, it loads the \texttt{amsthm} package, and
predefines the following environments:
\begin{center}
\ttfamily
\begin{tabular}{l@{\hspace{1cm}}l@{\hspace{1cm}}l}
theorem & definition & remark \\
proposition & example & note \\
problem & exercise & case \\
lemma & property & \\
conjecture & question & \\
corollary & solution & \\
claim & & \\
\end{tabular}
\end{center}
Note that the \texttt{proof} environment automatically adds a QED
symbol at the end of the proof (unless you give option
\texttt{[spthm]} to the \texttt{iacrtrans} class). If the QED symbol
is typeset at a wrong position, you can force its position with
\verb+\qedhere+.
\section{Class options}
\label{sec:options}
\subsection{Publication type}
The class supports four publication types, selected with the
following class options:
\begin{description}
\item[\texttt{[final]}] for final papers (default mode)
\item[\texttt{[preprint]}] for preprints (without copyright info)
\item[\texttt{[submission]}] for submissions (anonymous, with line numbers)
\item[\texttt{[draft]}] is similar to preprint, but activates draft
mode for the underlying \texttt{article} class (which shows overfull hboxes), and other packages
(\emph{e.g.} \texttt{graphicx}, \texttt{hyperref}).
\end{description}
\subsection{Other Options}
\paragraph{\texttt{[spthm]}}
provides theorem environments that emulates
\texttt{llncs} class's \texttt{sptheorem}:
\begin{itemize}
\item A \texttt{\textbackslash spnewtheorem} wrapper is provided
around \AmS{} \texttt{\textbackslash newtheorem}. Note that the
styling options are ignored; you should use standard
\texttt{amsthm} commands for fine control.
\item The \AmS{} \texttt{proof} environment will not automatically add a
QED symbol at the end of the proof.
\end{itemize}
\paragraph{\texttt{[floatrow]}}
uses the \texttt{floatrow} package to customize floats rather than the
plain \texttt{float} package. In particular, this allows to typeset
floats side by side as shown in this example:
\begin{verbatim}
\documentclass[floatrow]{iacrtrans}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
\begin{floatrow}
\ffigbox{\includegraphics[width=0.4\textwidth]{1.png}}
{\caption{This is caption 1.}}
\ffigbox{\includegraphics[width=0.4\textwidth]{2.png}}
{\caption{This is caption 2.}}
\end{floatrow}
\end{figure}
\end{document}
\end{verbatim}
The row will be divided equally according to the number of figures, but
you can ask each figure to take its natural space instead with
\verb+\ffigbox[\FBwidth]+. For more advanced use, see the
\texttt{floatrow} documentation.
\paragraph{\texttt{[nohyperref]}}
disables the automatic loading of
\texttt{hyperref}. Use this is if your document fails to compile with
\texttt{hyperref} for some reason.
The \texttt{iacrtrans} class automatically loads \texttt{hyperref}
after all other packages. If you need some packages to be loaded
\emph{after} \texttt{hyperref}, you should load \texttt{hyperref}
explicitly at the correct position, but not use the \texttt{[nohyperref]} option.
\section{Typesetting the Bibliography}
\label{sec:biblio}
% Borrowed from btxdoc.tex
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
Having good bibliographic references is very important for the
visibility of the journal. Since we don't have a commercial editor,
authors need to make sure themselves that references are standardized
and clean. We strongly encourage authors to use \BibTeX{} for the
bibliograpy, using bibliographic data
from \url{http://www.dblp.org} or \url{https://cryptobib.di.ens.fr/}.
We are still working on a good solution for the bibliography, and we
expect to have more specific instructions when producing the final
version of the papers, including a dedicated \BibTeX{} style.
\section{Further instructions}
\paragraph{\LaTeX{} distribution, and worklow.} \LaTeX{}
distributions are available on a variaty of platforms. In particular,
we recommand the \href{https://www.tug.org/texlive/}{TeX Live}
distribution, which is updated regularly, include a large number of
packages, and is available on many platforms.
\begin{description}
\item[Linux:] A LaTeX installation is included in most Linux
distributions. Alternatively,
\href{https://www.tug.org/texlive/}{TeX Live} can be installed
easily without root access.
\item[Windows:] There are also good \LaTeX{} distributions for Windows,
such as \href{http://www.miktex.org/}{MikTeX} and
\href{https://www.tug.org/texlive/}{TeX Live}.
\item[MacOSX:] On MacOSX, TeX Live is available inside
\href{http://www.tug.org/mactex/}{MacTeX}.
\end{description}
We recommand the use of \texttt{pdflatex} because it generally
supports more features than \texttt{latex} and \texttt{dvips}
(\texttt{xelatex} and \texttt{lualatex} are also missing some advanced
features from \texttt{pdflatex}).
\paragraph{Internal references.}
We recommend the use of \verb+\autoref+ from \texttt{hyperref}
(automatically loaded by the class). For instance,
\verb+\autoref{sec:options}+ links to \autoref{sec:options}.
\paragraph{Pictures.}
We recommend the use of the \texttt{tikz} package to render pictures.
In particular, a large variety of crypto pictures made with
\texttt{tikz} is available at \url{http://www.iacr.org/authors/tikz/}.
\paragraph{External pictures.} The \texttt{graphicx} is loaded by the
class, and is recommended for external figures.
If possible, external figures should be in a vector format: you can
use PDF files when compiling with \texttt{pdflatex}, and EPS files
when compiling with \texttt{latex}, and \texttt{dvips}. Note that the
\verb+\includegraphics+ command will automatically select a file with
the right extension, so if you write \verb+\includegraphics{figure}+
and have two files \texttt{figure.pdf} and \texttt{figure.eps}, it
should work with both workflow.
\paragraph{Floats.}
Figure captions should be below the figures, and table captions above
the tables. The \texttt{float} package loaded by the class should
take care of this automatically. If want to have several figures side
by side, see the \texttt{[floatrow]} option.
\paragraph{Tables.}
We recommend the \texttt{booktabs} package to typeset tables.
\paragraph{Algorithms.}
We recommend the \texttt{algorithm}, \texttt{algorithmcx} packages for
algorithms (in particular, \texttt{algpseudocode} for pseudo-code).
\section{For the Editor}
The following commands should be used by the editor to prepare the final
version:
\paragraph{\texttt{\textbackslash setfirstpage}} to set the first page number.
\paragraph{\texttt{\textbackslash setlastpage}} to set the first page
number (optional).
\paragraph{\texttt{\textbackslash setvolume}} to set the volume number.
\paragraph{\texttt{\textbackslash setnumber}} to set the edition number.
\paragraph{\texttt{\textbackslash setDOI}} to set the DOI.
\section{Further information}
More general information can be found in the following documents:
\begin{itemize}
\item General \LaTeX{} documentation, such as the
\href{http://mirrors.ctan.org/info/lshort/english/lshort.pdf}{(not
so) short introduction to \LaTeXe};
% \item The \texttt{article} class
% \href{http://mirrors.ctan.org/macros/latex/doc/clsguide.pdf}{documentation};
\item The \AmS-\LaTeX{}
\href{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}{documentation}
and \texttt{amsthm} \href{ftp://ftp.ams.org/pub/tex/doc/amscls/amsthdoc.pdf}{documentation};
\item Documentation of the \LaTeX{} packages used in the class (see below).
\end{itemize}
\subsection{Packages used}
The class is based on the standard \texttt{article} class, and loads
the following packages:
\begin{itemize}
\item \texttt{geometry}, \texttt{secsty}, \texttt{fancyhdr}, \texttt{mathtools},
\texttt{float}, \texttt{microtype}, \texttt{lastpage}
\item \texttt{amsmath}, \texttt{amssymb}, \texttt{amsthm}
\item \texttt{graphicx}
\item \texttt{hyperref}, \texttt{hyperxmp}, \texttt{etoolbox}, \texttt{xcolor} (unless
the \texttt{[nohyperref]} option is used)
\item \texttt{lineno} (in \texttt{[submission]} mode)
\item \texttt{floatrow,caption} (with option \texttt{[floatrow]})
\end{itemize}
\section*{Thanks}
We would like to thank people who helped design and improve the
class:
Anne Canteaut,
Jérémy Jean,
Bart Preneel,
Christian Rechberger,
Tyge Tiessen,
Friedrich Wiemer.
\section*{Changes}
\begin{description}
\item[v 0.21] First public version
\item[v 0.22] Added documentations. Minor tweaks in the class.
\item[v 0.23] More documentation. Removed some extra line-numbers
with AMS environments in submission mode. Make \verb+autoref+
capitalize sections. Table caption are now above tables. Rewritten
running authors and running title. Added PDF info (title, author,
keyword). Optional argument for \verb+\email+. Added
\texttt{floatrow} option.
\item[v 0.24] Added CC licence text, and added XMP metadata. Fixed some
metadata transformations.
\end{description}
\end{document}

View file

@ -0,0 +1,448 @@
% IACR Transactions DOCUMENT CLASS -- version 0.24 (26 August 2016)
% Written by Gaetan Leurent gaetan.leurent@inria.fr (2016)
%
% To the extent possible under law, the author(s) have dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.
%
%
%%% Class options:
%
% [preprint] Preprint (no copyright info)
% [submission] Anonymous submission
% [spthm] Emulate llncs sptheorem and remove automatic \qed in proof
% [nohyperref] Disable automatic loading of hyperref
% [draft]
%
%%% HOWTO use this class
%
%% Title
% \title[short]{Long title}
%
%% Authors/affiliation:
% \author{Alice \and Bob}
% \institute{ABC\\ \email{alice@abc} \and DEF\\ \email{bob@def}}
%
%% Keywords/abstract:
% \keywords{banana \and apple}
% \begin{abstract}
% Lorem ipsum dolor sit amet...
% \end{abstract}
%
%% Warnings
% - please don't use any \pagestyle of \thispagestyle command
% - if you have proof with explicit \qed inside, you should either
% remove \qed symbols, replace them by \qedhere, or add option [spthm]
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{iacrtrans}[2016/08/26 v0.24 IACR Transactions Author Class]
% Common definitions
\def\publname{IACR Transactions on Cryptographic Hardware and Embedded Systems}
\def\IACR@vol{0}
\def\IACR@no{0}
\def\IACR@fp{1}
\def\IACR@DOI{XXXXXXXX}
\usepackage{lastpage}
\def\IACR@lp{\pageref*{LastPage}}
\newcommand{\setfirstpage}[1]{\def\IACR@fp{#1}\setcounter{page}{#1}}
\newcommand{\setlastpage}[1]{\def\IACR@lp{#1}}
\newcommand{\setvolume}[1]{\def\IACR@vol{#1}}
\newcommand{\setnumber}[1]{\def\IACR@no{#1}}
\newcommand{\setDOI}[1]{\def\IACR@DOI{#1}}
% Options
\newif\if@loadhr
\@loadhrtrue
\DeclareOption{nohyperref}{\@loadhrfalse}
\newif\if@floatrow
\@floatrowfalse
\DeclareOption{floatrow}{\@floatrowtrue}
\newif\if@submission
\@submissionfalse
\newif\if@preprint
\@preprintfalse
\DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}} % Default
\DeclareOption{preprint}{\@preprinttrue}
\DeclareOption{submission}{\@submissiontrue}
\DeclareOption{draft}{\@preprinttrue\PassOptionsToClass{\CurrentOption}{article}}
\newif\if@spthm
\@spthmfalse
\DeclareOption{spthm}{\@spthmtrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
% article class with a4paper
\LoadClass[10pt,twoside]{article}[2007/10/19]
% Geometry
\RequirePackage[a4paper,hscale=0.65,vscale=0.75,marginratio=1:1]{geometry}
% Title fonts: bf+sf
\RequirePackage{sectsty}
\allsectionsfont{\sffamily\boldmath}
% Also for descrptions
\renewcommand*\descriptionlabel[1]{\hspace\labelsep
\normalfont\bfseries\sffamily #1}
% Title/Author/affiliations
\def\@institute{No institute given.}
\newcommand{\institute}[1]{\gdef\@institute{#1}}
\newcommand{\authorrunning}[1]{\gdef\IACR@runningauthors{#1}}
\newcommand{\titlerunning}[1]{\gdef\IACR@runningtitle{#1}}
\newcounter{IACR@author@cnt}
\newcounter{IACR@inst@cnt}
\newif\if@IACR@autoinst
\@IACR@autoinsttrue
\def\IACR@author@last{0}
\renewcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\thispagestyle{title}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
% \global\let\@author\@empty
\global\let\@date\@empty
% \global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
\def\@maketitle{%
% Count authors and affiliations
\setcounter{IACR@author@cnt}{1}%
\setcounter{IACR@inst@cnt}{1}%
\setbox0\hbox{\def\thanks##1{\global\@IACR@autoinstfalse}\def\inst##1{\global\@IACR@autoinstfalse}\def\and{\stepcounter{IACR@author@cnt}}\@author}%
\setbox0\hbox{\def\and{\stepcounter{IACR@inst@cnt}}\@institute}%
\xdef\IACR@author@last{\theIACR@author@cnt}%
\edef\IACR@inst@last{\theIACR@inst@cnt}%
\ifnum\IACR@author@last=\IACR@inst@last\else\@IACR@autoinstfalse\fi
\ifnum\IACR@author@last=1 \@IACR@autoinstfalse\fi
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
{\LARGE \bfseries\sffamily\boldmath \@title\par}
\ifdefined\@subtitle\vskip .5em{\large\sffamily\bfseries\@subtitle\par}\fi}%
\vskip 1.5em%
{\large
\lineskip .5em%
\if@submission
Anonymous Submission
\else
\setcounter{IACR@author@cnt}{1}%
\def\and{\if@IACR@autoinst\inst{\theIACR@author@cnt} \fi
\stepcounter{IACR@author@cnt}%
\ifnum\theIACR@author@cnt=\IACR@author@last\unskip\space and \ignorespaces\else\unskip, \ignorespaces\fi}
\@author\if@IACR@autoinst\inst{\theIACR@author@cnt}\fi
\vskip 1em\par
\small
\setcounter{IACR@author@cnt}{1}%
\def\and{\par\stepcounter{IACR@author@cnt}$^\theIACR@author@cnt$~}
\ifnum\IACR@inst@last>1 $^1$~\fi
\@institute
\fi
}%
\end{center}%
\par
\vskip 1.5em}
\def\IACR@runningauthors{
\def\thanks##1{}%
\def\inst##1{}%
\def\fnmsep{}%
\def\\{}%
\def\footnote##1{}%
\setcounter{IACR@author@cnt}{1}%
\def\and{\stepcounter{IACR@author@cnt}%
\ifnum\theIACR@author@cnt=\IACR@author@last\unskip\space and \ignorespaces\else\unskip, \ignorespaces\fi}
\@author}
\def\IACR@runningtitle{%
\def\thanks##1{}%
\def\fnmsep{}%
\def\\{}%
\def\footnote##1{}%
\@title}
\def\author{\@ifnextchar[{\IACR@@@author}{\IACR@@author}}
\def\IACR@@@author[#1]#2{\authorrunning{#1}\gdef\@author{#2}}
\def\IACR@@author#1{\gdef\@author{#1}}
\if@submission
\gdef\@author{Anonymous Submission to \publname}
\renewcommand{\author}[2][]{}
\renewcommand{\authorrunning}[1]{}
\renewcommand{\institute}[2][]{}
\fi
\def\title{\@ifnextchar[{\IACR@@@title}{\IACR@@title}}
\def\IACR@@@title[#1]#2{\gdef\@title{#2}\titlerunning{#1}}
\def\IACR@@title#1{\gdef\@title{#1}}
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
\newcommand{\inst}[1]{\unskip$^{#1}$}
\def\fnmsep{\unskip$^,$}
% Head/foot
\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\fancypagestyle{title}{%
\fancyhf{} % clear all header and footer fields
\if@submission\else\if@preprint\else
\fancyfoot[L]{\small Licensed under \href{http://creativecommons.org/licenses/by/4.0/}{Creative Commons License CC-BY 4.0.}\\
\publname{} Vol.~\IACR@vol, No.\IACR@no, pp.\IACR@fp---\IACR@lp, \href{https://doi.org/\IACR@DOI}{DOI:\IACR@DOI}}
\fancyfoot[R]{\includegraphics[height=2ex]{CC-by}}
\if@loadhr
\hypersetup{pdfcopyright={Licensed under Creative Commons License CC-BY 4.0.}}
\hypersetup{pdflicenseurl={http://creativecommons.org/licenses/by/4.0/}}
\hypersetup{pdfsubject={IACR Transactions on Symmetric Cryptology}}
\hypersetup{pdflang=en}
\fi
\fi\fi
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\fancyhf{} % clear all header and footer fields
\fancyhead[RO,LE]{\thepage}
\fancyhead[RE]{\IACR@runningtitle}
\fancyhead[LO]{\IACR@runningauthors}
\renewcommand{\markboth}[2]{}
\pagestyle{fancy}
\def\subtitle#1{\gdef\@subtitle{#1}}
%Abstract style, keywords
\def\@IACR@keywords{No keywords given.}
\def\keywords{\@ifnextchar[{\IACR@@@keywords}{\IACR@@keywords}}
\def\IACR@@@keywords[#1]#2{\gdef\@IACR@PDFkeywords{#1}\gdef\@IACR@keywords{#2}}
\def\IACR@@keywords#1{\gdef\@IACR@keywords{#1}}
\renewenvironment{abstract}{%
\small\quotation\setlength{\parindent}{0pt}\noindent
\textbf{\textsf{Abstract.}}}
{\smallskip\par\textbf{\textsf{Keywords:}}
\def\and{\unskip\space\textperiodcentered\space\ignorespaces}\@IACR@keywords
\endquotation%
\if@loadhr
%% PDF keywords
\def\and{, }%
\def\thanks##1{}%
\def\footnote##1{}%
\def\inst##1{}%
\def\fnmsep{}%
\def\\{}%
\def\zap@comma@space##1 ,##2{%
##1%
\ifx##2\@empty\else, \expandafter\zap@comma@space\fi
##2}
\ifdefined\@IACR@PDFkeywords
\hypersetup{pdfkeywords=\@IACR@PDFkeywords}
\else
\protected@edef\@tmp{\expandafter\@IACR@keywords}
\protected@edef\@tmp{\expandafter\zap@comma@space\@tmp{} ,\@empty}
\hypersetup{pdfkeywords=\@tmp}
\fi
%% PDF author
\def\zap@one,##1{}
\def\zap@last##1,##2{\ifx##1\@empty\else\space and ##1\expandafter\zap@one\fi}
\def\zap@last@comma##1,##2,##3{%
##1%
\ifx##3\@empty%
\expandafter\zap@last\else
,\expandafter\zap@last@comma\fi%
##2,##3}
\def\zap@dbl@space##1 ##2{%
##1%
\ifx##2\@empty\else\space\expandafter\zap@dbl@space##2\fi}
\protected@edef\@tmp{\expandafter\@author}
% \protected@edef\@tmp{\expandafter\IACR@runningauthors}
\protected@edef\@tmp{\expandafter\zap@last@comma\@tmp,\@empty,\@empty}
\protected@edef\@tmp{\expandafter\zap@comma@space\@tmp{} ,\@empty}
\protected@edef\@tmp{\expandafter\zap@dbl@space\@tmp{} \@empty}
\hypersetup{pdfauthor=\@tmp}
%% PDF title
\hypersetup{pdftitle=\IACR@runningtitle}
\fi
}
% Hyperref
\if@loadhr
\RequirePackage{xcolor}
\RequirePackage{etoolbox}
\AtEndPreamble{
\@ifpackageloaded{hyperref}{}{\usepackage{hyperref}}
\@ifpackageloaded{hyperxmp}{}{\usepackage{hyperxmp}}
\hypersetup{colorlinks=true,
citecolor=black!70!green,
linkcolor=black!70!red}
}
\setcounter{tocdepth}{2}
\fi
% autoref: capitals for Sections, and adding Algorithm
\def\equationautorefname{Equation}%
\def\footnoteautorefname{footnote}%
\def\itemautorefname{item}%
\def\figureautorefname{Figure}%
\def\tableautorefname{Table}%
\def\partautorefname{Part}%
\def\appendixautorefname{Appendix}%
\def\chapterautorefname{Chapter}%
\def\sectionautorefname{Section}%
\def\subsectionautorefname{Subsection}%
\def\subsubsectionautorefname{Subsubsection}%
\def\paragraphautorefname{paragraph}%
\def\subparagraphautorefname{subparagraph}%
\def\FancyVerbLineautorefname{line}%
\def\theoremautorefname{Theorem}%
\def\pageautorefname{page}%
\def\algorithmautorefname{Algorithm}
% AMS math
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{mathtools}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{property}{Property}
\newtheorem{question}{Question}
\newtheorem{solution}{Solution}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newtheorem{problem}{Problem}
\newtheorem{lemma}{Lemma}
\newtheorem{conjecture}{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem*{claim}{Claim}
\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem{note}{Note}
\newtheorem{case}{Case}
\theoremstyle{plain}
%Emulate LLNCS spnewtheorem
\if@spthm
\def\spnewtheorem{\@ifstar{\IACR@spstar}{\IACR@sp}}
\def\IACR@spstar#1#2#3#4{\newtheorem*{#1}{#2}}
\def\IACR@sp#1{\@ifnextchar[{\IACR@sp@b{#1}}{\IACR@sp@a{#1}}}
\def\IACR@sp@a#1#2[#3]#4#5{\newtheorem{#1}{#2}[#3]}
\def\IACR@sp@b#1[#2]#3#4#5{\newtheorem{#1}[#2]{#3}}
\renewcommand{\pushQED}[1]{}
\fi
% Floats and captions
\if@floatrow
\RequirePackage{floatrow}
\floatsetup[table]{style=Plaintop}
\RequirePackage{caption}
\captionsetup{labelfont={sf,bf}}
\else
\RequirePackage{float}
\newcommand\fs@iacrabove{%
% Swap \abovecaptionskip and \belowcaptionskip
\addtolength\abovecaptionskip{-\belowcaptionskip}
\addtolength\belowcaptionskip{\abovecaptionskip}
\addtolength\abovecaptionskip{-\belowcaptionskip}
\setlength\abovecaptionskip{-\abovecaptionskip}
\fs@plaintop%
\def\@fs@cfont{\sffamily\bfseries}}
\newcommand\fs@iacrbelow{%
\fs@plain%
\def\@fs@cfont{\sffamily\bfseries}}
\floatstyle{iacrabove}
\restylefloat{table}
\floatstyle{iacrbelow}
\restylefloat{figure}
\fi
% Extra commands
\def\email{\@ifnextchar[{\IACR@@email}{\IACR@email}}
\if@loadhr
\def\IACR@@email[#1]#2{\href{mailto:#1}{\nolinkurl{#2}}}
\def\IACR@email#1{\href{mailto:#1}{\nolinkurl{#1}}}
\else
\RequirePackage{url}
\def\IACR@@email[#1]#2{\url{#2}}
\def\IACR@email#1{\url{#1}}
\fi
% Line # for submission
\newcommand\linenomathWithnumbersforAMS{%
\ifLineNumbers
%% \ifx\@@par\@@@par\else
\ifnum\interlinepenalty>-\linenopenaltypar
\global\holdinginserts\thr@@
\advance\interlinepenalty \linenopenalty
\ifhmode % v4.3
\advance\predisplaypenalty \linenopenalty
\fi
%% \advance\postdisplaypenalty \linenopenalty
\advance\interdisplaylinepenalty \linenopenalty
\fi
\fi
\ignorespaces
}
\if@submission
\RequirePackage[mathlines]{lineno}
\linenumbers
\def\linenumberfont{\normalfont\tiny\sffamily\color{gray}}
% Taken from http://phaseportrait.blogspot.fr/2007/08/lineno-and-amsmath-compatibility.html
\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}%
{\linenomathWithnumbersforAMS\csname old#1\endcsname}%
{\csname oldend#1\endcsname\endlinenomath}}%
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
\patchAmsMathEnvironmentForLineno{#1}%
\patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
%\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}
\fi
% Microtype
\RequirePackage{microtype}
% Fonts
\usepackage[T1]{fontenc}
\usepackage{lmodern}

448
paper/iacrtrans.cls Normal file
View file

@ -0,0 +1,448 @@
% IACR Transactions DOCUMENT CLASS -- version 0.24 (26 August 2016)
% Written by Gaetan Leurent gaetan.leurent@inria.fr (2016)
%
% To the extent possible under law, the author(s) have dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.
%
%
%%% Class options:
%
% [preprint] Preprint (no copyright info)
% [submission] Anonymous submission
% [spthm] Emulate llncs sptheorem and remove automatic \qed in proof
% [nohyperref] Disable automatic loading of hyperref
% [draft]
%
%%% HOWTO use this class
%
%% Title
% \title[short]{Long title}
%
%% Authors/affiliation:
% \author{Alice \and Bob}
% \institute{ABC\\ \email{alice@abc} \and DEF\\ \email{bob@def}}
%
%% Keywords/abstract:
% \keywords{banana \and apple}
% \begin{abstract}
% Lorem ipsum dolor sit amet...
% \end{abstract}
%
%% Warnings
% - please don't use any \pagestyle of \thispagestyle command
% - if you have proof with explicit \qed inside, you should either
% remove \qed symbols, replace them by \qedhere, or add option [spthm]
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{iacrtrans}[2016/08/26 v0.24 IACR Transactions Author Class]
% Common definitions
\def\publname{IACR Transactions on Cryptographic Hardware and Embedded Systems}
\def\IACR@vol{0}
\def\IACR@no{0}
\def\IACR@fp{1}
\def\IACR@DOI{XXXXXXXX}
\usepackage{lastpage}
\def\IACR@lp{\pageref*{LastPage}}
\newcommand{\setfirstpage}[1]{\def\IACR@fp{#1}\setcounter{page}{#1}}
\newcommand{\setlastpage}[1]{\def\IACR@lp{#1}}
\newcommand{\setvolume}[1]{\def\IACR@vol{#1}}
\newcommand{\setnumber}[1]{\def\IACR@no{#1}}
\newcommand{\setDOI}[1]{\def\IACR@DOI{#1}}
% Options
\newif\if@loadhr
\@loadhrtrue
\DeclareOption{nohyperref}{\@loadhrfalse}
\newif\if@floatrow
\@floatrowfalse
\DeclareOption{floatrow}{\@floatrowtrue}
\newif\if@submission
\@submissionfalse
\newif\if@preprint
\@preprintfalse
\DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}} % Default
\DeclareOption{preprint}{\@preprinttrue}
\DeclareOption{submission}{\@submissiontrue}
\DeclareOption{draft}{\@preprinttrue\PassOptionsToClass{\CurrentOption}{article}}
\newif\if@spthm
\@spthmfalse
\DeclareOption{spthm}{\@spthmtrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
% article class with a4paper
\LoadClass[10pt,twoside]{article}[2007/10/19]
% Geometry
\RequirePackage[a4paper,hscale=0.65,vscale=0.75,marginratio=1:1]{geometry}
% Title fonts: bf+sf
\RequirePackage{sectsty}
\allsectionsfont{\sffamily\boldmath}
% Also for descrptions
\renewcommand*\descriptionlabel[1]{\hspace\labelsep
\normalfont\bfseries\sffamily #1}
% Title/Author/affiliations
\def\@institute{No institute given.}
\newcommand{\institute}[1]{\gdef\@institute{#1}}
\newcommand{\authorrunning}[1]{\gdef\IACR@runningauthors{#1}}
\newcommand{\titlerunning}[1]{\gdef\IACR@runningtitle{#1}}
\newcounter{IACR@author@cnt}
\newcounter{IACR@inst@cnt}
\newif\if@IACR@autoinst
\@IACR@autoinsttrue
\def\IACR@author@last{0}
\renewcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\thispagestyle{title}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
% \global\let\@author\@empty
\global\let\@date\@empty
% \global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
\def\@maketitle{%
% Count authors and affiliations
\setcounter{IACR@author@cnt}{1}%
\setcounter{IACR@inst@cnt}{1}%
\setbox0\hbox{\def\thanks##1{\global\@IACR@autoinstfalse}\def\inst##1{\global\@IACR@autoinstfalse}\def\and{\stepcounter{IACR@author@cnt}}\@author}%
\setbox0\hbox{\def\and{\stepcounter{IACR@inst@cnt}}\@institute}%
\xdef\IACR@author@last{\theIACR@author@cnt}%
\edef\IACR@inst@last{\theIACR@inst@cnt}%
\ifnum\IACR@author@last=\IACR@inst@last\else\@IACR@autoinstfalse\fi
\ifnum\IACR@author@last=1 \@IACR@autoinstfalse\fi
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
{\LARGE \bfseries\sffamily\boldmath \@title\par}
\ifdefined\@subtitle\vskip .5em{\large\sffamily\bfseries\@subtitle\par}\fi}%
\vskip 1.5em%
{\large
\lineskip .5em%
\if@submission
Anonymous Submission
\else
\setcounter{IACR@author@cnt}{1}%
\def\and{\if@IACR@autoinst\inst{\theIACR@author@cnt} \fi
\stepcounter{IACR@author@cnt}%
\ifnum\theIACR@author@cnt=\IACR@author@last\unskip\space and \ignorespaces\else\unskip, \ignorespaces\fi}
\@author\if@IACR@autoinst\inst{\theIACR@author@cnt}\fi
\vskip 1em\par
\small
\setcounter{IACR@author@cnt}{1}%
\def\and{\par\stepcounter{IACR@author@cnt}$^\theIACR@author@cnt$~}
\ifnum\IACR@inst@last>1 $^1$~\fi
\@institute
\fi
}%
\end{center}%
\par
\vskip 1.5em}
\def\IACR@runningauthors{
\def\thanks##1{}%
\def\inst##1{}%
\def\fnmsep{}%
\def\\{}%
\def\footnote##1{}%
\setcounter{IACR@author@cnt}{1}%
\def\and{\stepcounter{IACR@author@cnt}%
\ifnum\theIACR@author@cnt=\IACR@author@last\unskip\space and \ignorespaces\else\unskip, \ignorespaces\fi}
\@author}
\def\IACR@runningtitle{%
\def\thanks##1{}%
\def\fnmsep{}%
\def\\{}%
\def\footnote##1{}%
\@title}
\def\author{\@ifnextchar[{\IACR@@@author}{\IACR@@author}}
\def\IACR@@@author[#1]#2{\authorrunning{#1}\gdef\@author{#2}}
\def\IACR@@author#1{\gdef\@author{#1}}
\if@submission
\gdef\@author{Anonymous Submission to \publname}
\renewcommand{\author}[2][]{}
\renewcommand{\authorrunning}[1]{}
\renewcommand{\institute}[2][]{}
\fi
\def\title{\@ifnextchar[{\IACR@@@title}{\IACR@@title}}
\def\IACR@@@title[#1]#2{\gdef\@title{#2}\titlerunning{#1}}
\def\IACR@@title#1{\gdef\@title{#1}}
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
\newcommand{\inst}[1]{\unskip$^{#1}$}
\def\fnmsep{\unskip$^,$}
% Head/foot
\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\fancypagestyle{title}{%
\fancyhf{} % clear all header and footer fields
\if@submission\else\if@preprint\else
\fancyfoot[L]{\small Licensed under \href{http://creativecommons.org/licenses/by/4.0/}{Creative Commons License CC-BY 4.0.}\\
\publname{} Vol.~\IACR@vol, No.\IACR@no, pp.\IACR@fp---\IACR@lp, \href{https://doi.org/\IACR@DOI}{DOI:\IACR@DOI}}
\fancyfoot[R]{\includegraphics[height=2ex]{CC-by}}
\if@loadhr
\hypersetup{pdfcopyright={Licensed under Creative Commons License CC-BY 4.0.}}
\hypersetup{pdflicenseurl={http://creativecommons.org/licenses/by/4.0/}}
\hypersetup{pdfsubject={IACR Transactions on Symmetric Cryptology}}
\hypersetup{pdflang=en}
\fi
\fi\fi
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\fancyhf{} % clear all header and footer fields
\fancyhead[RO,LE]{\thepage}
\fancyhead[RE]{\IACR@runningtitle}
\fancyhead[LO]{\IACR@runningauthors}
\renewcommand{\markboth}[2]{}
\pagestyle{fancy}
\def\subtitle#1{\gdef\@subtitle{#1}}
%Abstract style, keywords
\def\@IACR@keywords{No keywords given.}
\def\keywords{\@ifnextchar[{\IACR@@@keywords}{\IACR@@keywords}}
\def\IACR@@@keywords[#1]#2{\gdef\@IACR@PDFkeywords{#1}\gdef\@IACR@keywords{#2}}
\def\IACR@@keywords#1{\gdef\@IACR@keywords{#1}}
\renewenvironment{abstract}{%
\small\quotation\setlength{\parindent}{0pt}\noindent
\textbf{\textsf{Abstract.}}}
{\smallskip\par\textbf{\textsf{Keywords:}}
\def\and{\unskip\space\textperiodcentered\space\ignorespaces}\@IACR@keywords
\endquotation%
\if@loadhr
%% PDF keywords
\def\and{, }%
\def\thanks##1{}%
\def\footnote##1{}%
\def\inst##1{}%
\def\fnmsep{}%
\def\\{}%
\def\zap@comma@space##1 ,##2{%
##1%
\ifx##2\@empty\else, \expandafter\zap@comma@space\fi
##2}
\ifdefined\@IACR@PDFkeywords
\hypersetup{pdfkeywords=\@IACR@PDFkeywords}
\else
\protected@edef\@tmp{\expandafter\@IACR@keywords}
\protected@edef\@tmp{\expandafter\zap@comma@space\@tmp{} ,\@empty}
\hypersetup{pdfkeywords=\@tmp}
\fi
%% PDF author
\def\zap@one,##1{}
\def\zap@last##1,##2{\ifx##1\@empty\else\space and ##1\expandafter\zap@one\fi}
\def\zap@last@comma##1,##2,##3{%
##1%
\ifx##3\@empty%
\expandafter\zap@last\else
,\expandafter\zap@last@comma\fi%
##2,##3}
\def\zap@dbl@space##1 ##2{%
##1%
\ifx##2\@empty\else\space\expandafter\zap@dbl@space##2\fi}
\protected@edef\@tmp{\expandafter\@author}
% \protected@edef\@tmp{\expandafter\IACR@runningauthors}
\protected@edef\@tmp{\expandafter\zap@last@comma\@tmp,\@empty,\@empty}
\protected@edef\@tmp{\expandafter\zap@comma@space\@tmp{} ,\@empty}
\protected@edef\@tmp{\expandafter\zap@dbl@space\@tmp{} \@empty}
\hypersetup{pdfauthor=\@tmp}
%% PDF title
\hypersetup{pdftitle=\IACR@runningtitle}
\fi
}
% Hyperref
\if@loadhr
\RequirePackage{xcolor}
\RequirePackage{etoolbox}
\AtEndPreamble{
\@ifpackageloaded{hyperref}{}{\usepackage{hyperref}}
\@ifpackageloaded{hyperxmp}{}{\usepackage{hyperxmp}}
\hypersetup{colorlinks=true,
citecolor=black!70!green,
linkcolor=black!70!red}
}
\setcounter{tocdepth}{2}
\fi
% autoref: capitals for Sections, and adding Algorithm
\def\equationautorefname{Equation}%
\def\footnoteautorefname{footnote}%
\def\itemautorefname{item}%
\def\figureautorefname{Figure}%
\def\tableautorefname{Table}%
\def\partautorefname{Part}%
\def\appendixautorefname{Appendix}%
\def\chapterautorefname{Chapter}%
\def\sectionautorefname{Section}%
\def\subsectionautorefname{Subsection}%
\def\subsubsectionautorefname{Subsubsection}%
\def\paragraphautorefname{paragraph}%
\def\subparagraphautorefname{subparagraph}%
\def\FancyVerbLineautorefname{line}%
\def\theoremautorefname{Theorem}%
\def\pageautorefname{page}%
\def\algorithmautorefname{Algorithm}
% AMS math
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{mathtools}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{property}{Property}
\newtheorem{question}{Question}
\newtheorem{solution}{Solution}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newtheorem{problem}{Problem}
\newtheorem{lemma}{Lemma}
\newtheorem{conjecture}{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem*{claim}{Claim}
\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem{note}{Note}
\newtheorem{case}{Case}
\theoremstyle{plain}
%Emulate LLNCS spnewtheorem
\if@spthm
\def\spnewtheorem{\@ifstar{\IACR@spstar}{\IACR@sp}}
\def\IACR@spstar#1#2#3#4{\newtheorem*{#1}{#2}}
\def\IACR@sp#1{\@ifnextchar[{\IACR@sp@b{#1}}{\IACR@sp@a{#1}}}
\def\IACR@sp@a#1#2[#3]#4#5{\newtheorem{#1}{#2}[#3]}
\def\IACR@sp@b#1[#2]#3#4#5{\newtheorem{#1}[#2]{#3}}
\renewcommand{\pushQED}[1]{}
\fi
% Floats and captions
\if@floatrow
\RequirePackage{floatrow}
\floatsetup[table]{style=Plaintop}
\RequirePackage{caption}
\captionsetup{labelfont={sf,bf}}
\else
\RequirePackage{float}
\newcommand\fs@iacrabove{%
% Swap \abovecaptionskip and \belowcaptionskip
\addtolength\abovecaptionskip{-\belowcaptionskip}
\addtolength\belowcaptionskip{\abovecaptionskip}
\addtolength\abovecaptionskip{-\belowcaptionskip}
\setlength\abovecaptionskip{-\abovecaptionskip}
\fs@plaintop%
\def\@fs@cfont{\sffamily\bfseries}}
\newcommand\fs@iacrbelow{%
\fs@plain%
\def\@fs@cfont{\sffamily\bfseries}}
\floatstyle{iacrabove}
\restylefloat{table}
\floatstyle{iacrbelow}
\restylefloat{figure}
\fi
% Extra commands
\def\email{\@ifnextchar[{\IACR@@email}{\IACR@email}}
\if@loadhr
\def\IACR@@email[#1]#2{\href{mailto:#1}{\nolinkurl{#2}}}
\def\IACR@email#1{\href{mailto:#1}{\nolinkurl{#1}}}
\else
\RequirePackage{url}
\def\IACR@@email[#1]#2{\url{#2}}
\def\IACR@email#1{\url{#1}}
\fi
% Line # for submission
\newcommand\linenomathWithnumbersforAMS{%
\ifLineNumbers
%% \ifx\@@par\@@@par\else
\ifnum\interlinepenalty>-\linenopenaltypar
\global\holdinginserts\thr@@
\advance\interlinepenalty \linenopenalty
\ifhmode % v4.3
\advance\predisplaypenalty \linenopenalty
\fi
%% \advance\postdisplaypenalty \linenopenalty
\advance\interdisplaylinepenalty \linenopenalty
\fi
\fi
\ignorespaces
}
\if@submission
\RequirePackage[mathlines]{lineno}
\linenumbers
\def\linenumberfont{\normalfont\tiny\sffamily\color{gray}}
% Taken from http://phaseportrait.blogspot.fr/2007/08/lineno-and-amsmath-compatibility.html
\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}%
{\linenomathWithnumbersforAMS\csname old#1\endcsname}%
{\csname oldend#1\endcsname\endlinenomath}}%
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
\patchAmsMathEnvironmentForLineno{#1}%
\patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
%\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}
\fi
% Microtype
\RequirePackage{microtype}
% Fonts
\usepackage[T1]{fontenc}
\usepackage{lmodern}

View file

@ -0,0 +1,140 @@
\documentclass[nohyperref]{iacrtrans}
\usepackage[T1]{fontenc}
\usepackage[
backend=biber,
style=numeric,
natbib=true,
url=false,
doi=true,
eprint=false
]{biblatex}
\addbibresource{safety-reset.bib}
\usepackage{amssymb,amsmath}
\usepackage{eurosym}
\usepackage{wasysym}
\usepackage{amsthm}
\usepackage[binary-units]{siunitx}
\DeclareSIUnit{\baud}{Bd}
\DeclareSIUnit{\year}{a}
\usepackage{commath}
\usepackage{graphicx,color}
\usepackage{subcaption}
\usepackage{array}
\usepackage{hyperref}
\renewcommand{\floatpagefraction}{.8}
\newcommand{\degree}{\ensuremath{^\circ}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcommand{\partnum}[1]{\texttt{#1}}
\begin{document}
\title[Ripples in a Pond]{Transmitting Information through Grid Frequency Modulation}
\author{Jan Sebastian Götte \and Björn Scheuermann}
\institute{HIIG\\ \email{safetyreset@jaseg.de} \and HU Berlin \\ \email{scheuermann@informatik.hu-berlin.de}}
% FIXME keywords
\keywords{hardware security \and energy systems \and signal theory}
\maketitle
\begin{abstract}
\end{abstract}
\section{Introduction}
In the power grid, as in many other engineered systems, we can observe an ongoing diffusion of information systems into
industrial control systems. Automation of these control systems has already been practiced for the better part of a
century. Throughout the 20th century this automation was mostly limited to core components of the grid. Generators in
power stations are computer-controlled according to electromechanical and economic models. Switching in substations is
automated to allow for fast failure recovery. Human operators are still vital to these systems, but their tasks have
shifted from pure operation to engineering, maintenance and surveillance\cite{crastan03,anderson02}.
With the turn of the century came a large-scale trend in power systems to move from a model of centralized generation,
built around massive large-scale fossil and nuclear power plants, towards a more heterogenous model of smaller-scale
generators working together. In this new model large-scale fossil power plants still serve a major role, but two new
factors come into play. One is the advance of renewable energies. The large-scale use of wind and solar power in
particular from a current standpoint seems unavoidable for our continued existence on this planet. For the electrical
grid these systems constitute a significant challenge. Fossil-fueled power plants can be controlled in a precise and
quick way to match energy consumption. This tracking of consumption with production is vital to the stability of the
grid. Renewable energies such as wind and solar power do not provide the same degree of controllability, and they
introduce a larger degree of uncertainty due to the unpredictability of the forces of nature\cite{crastan03}.
Along with this change in dynamic behavior, renewable energies have brought forth the advance of distributed generation.
In distributed generation end-customers that previously only consumed energy have started to feed energy into the grid
from small solar installations on their property. Distributed generation is a chance for customers to gain autonomy and
shift from a purely passive role to being active participants of the electricity market\cite{crastan03}.
To match this new landscape of decentralized generation and unpredictable renewable resources the utility industry has
had to adapt itself in major ways. One aspect of this adaptation that is particularly visible to ordinary people is the
computerization of end-user energy metering. Despite the widespread use of industrial control systems inside the
electrical grid and the far-reaching diffusion of computers into people's everyday lives the energy meter has long been
one of the last remnants of an offline, analog time. Until the 2010s many households were still served through
electromechanical Ferraris-style meters that have their origin in the late 19th
century\cite{borlase01,ukgov04,bnetza02}. Today under the umbrella term \emph{Smart Metering} the shift towards fully
computerized, often networked meters is well underway. The roll out of these \emph{Smart Meters} has not been very
smooth overall with some countries severely lagging behind. As a safety-critical technology, smart metering technology
is usually standardized on a per-country basis. This leads to an inhomogenous landscape with--in some instances--wildly
incompatible systems. Often vendors only serve a single country or have separate models of a meter for each country.
This complex standardization landscape and market situation has led to a proliferation of highly complex, custom-coded
microcontroller firmware. The complexity and scale of this--often network-connected--firmware makes for a ripe substrate
for bugs to surface.
A remotely exploitable flaw inside a smart meter's firmware\footnote{
There are several smart metering architectures that ascribe different roles to the component called \emph{smart
meter}. Not all systems are susceptible to attacks to the same degree, with the German implementation being almost
immune as far as energy availability is concerned. For clarity, we use \emph{smart meter} to describe the entire
system at the customer premises including both the meter and if present a gateway.
} could have consequences ranging from impaired billing functionality to an existential threat to grid
stability\cite{anderson01,anderson02}. In a country where meters commonly include disconnect switches for purposes such
as prepaid tariffs a coördinated attack could at worst cause widespread activation of grid safety systems by repeatedly
connecting and disconnecting megawatts of load capacity in just the wrong moments\cite{wu01}.
Mitigation of these attacks through firmware security measures is unlikely to yield satisfactory results. The enormous
complexity of smart meter firmware makes firmware security extremely labor-intensive. The diverse standardization
landscape makes a coördinated, comprehensive response unlikely.
In this paper, instead of focusing on the very hard task of improving firmware security we introduce a pragmatic
solution to the--in our opinion likely--scenario of a large-scale compromise of smart meter firmware. In our proposal
the components of the smart meter that are threatened by remote compromise are equipped with a physically separate
\emph{safety reset controller} that listens for a reset command transmitted through the electrical grid's frequency and
on reception forcibly resets the smart meter's entire firmware to a known-good state. Our safety reset controller
receives commands through Direct Sequence Spread Spectrum (DSSS) modulation carried out on grid frequency through a
large controllable load such as an aluminum smelter. After forward error correction and cryptographic verification it
re-flashes the meter's main microcontroller over the standard JTAG interface. Note that our modulation technique is one
\emph{changing grid frequency itself}. This is fundamentally different in both generation and detection from systems
such as traditional PLC that superimpose a signal on grid voltage, but leave grid frequency itself unaffected.
In this thesis, starting from a high level architecture we have carried out extensive simulations of our proposal's
performance under real-world conditions. Based on these simulations we implemented an end-to-end prototype of our
proposed safety reset controller as part of a realistic smart meter demonstrator. Finally we experimentally validated
our results and we will conclude with an outline of further steps towards a practical implementation.
This work contains the following contributions:
\begin{enumerate}
\item We introduce Grid Frequency Modulation (GFM) as a communication primitive. % FIXME done before in that one paper
\item We elaborate the fundamental physics underlying GFM and theorize on the constrains of a practical
implementation.
\item We design a communication system based on GFM.
\item We carry out extensive simulations of our systems to determine its performance characteristics.
\item We show the simple grid voltage recorder design we used to capture data for our simulations.
\item We introduce a new, simplified method to determine grid frequency from a capture of the grid voltage waveform
that is simple to implement on constrained embedded devices.
\end{enumerate}
\section{Related work}
\label{sec_related_work}
\section{Conclusion}
\label{sec_conclusion}
\printbibliography[heading=bibintoc]
%%% FIXME remove appendix and work into text.
\center{
\center{This is version \texttt{\input{version.tex}\unskip} of this paper, generated on \today. The git repository
can be found at:}
\center{\url{https://git.jaseg.de/safety-reset.git}}
}
\end{document}

1741
paper/safety-reset.bib Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
LAB_PATH ?= ../lab-windows LAB_PATH ?= ../notebooks
SHELL := bash SHELL := bash
.ONESHELL: .ONESHELL: