\documentclass[openany]{../template/now} % creates the journal version
% \documentclass{../template/now}  % creates the book pdf version

% the now document class sets various dimensions, so be sure to *not* set
% or alter dimensions in your latex code.
% be sure to remove all manual formatting commands such \newpage, \clearpage.

% Strongly discourage haning lines
\widowpenalty=999999
\clubpenalty=999999
\setlength\parfillskip{0pt plus .4\textwidth}
\setlength\emergencystretch{.1\textwidth}

% \usepackage{times}
% \usepackage{microtype}
\usepackage{color}

% Defines \varnothing.
\usepackage{amssymb}

% Defines \mod
\usepackage{amsmath}
% \usepackage{graphicx}
% A column entry can stretch over multiple rows.
% \usepackage{multirow}

% Environment with stretchable columns.
\usepackage{tabularx}

% Certain huge tables should be rotated
\usepackage{lscape}

% URLs in the bibliography.
% \usepackage{url}
% Code listings.
\usepackage{listings}
\lstset{
  numbers=left, frame=lines, tabsize=2, captionpos=b, keepspaces=true,
  commentstyle=\color[rgb]{0.5, 0.5, 0.5},
  keywordstyle=\bfseries\color[rgb]{0, 0, 1},
  numberstyle=\color[rgb]{0.75, 0.75, 0.75},
  columns=fullflexible, showstringspaces=false,
  basicstyle=\footnotesize\ttfamily, extendedchars=true, breaklines=true
}
% CLRS-like algorithms.
\usepackage{clrscode}

% References to part 1
\usepackage{xr-hyper}
\usepackage{hyperref}
%\externaldocument[II-]{part_2}
\externaldocument[I-]{"../tmp/part1/main"}[part_1.pdf]
\newcommand{\eref}[2]{#1.\ref{#1-#2}}

% a few definitions that are *not* needed in general:
\newcommand{\ie}{\emph{i.e.}}
\newcommand{\eg}{\emph{e.g.}}
\newcommand{\etc}{\emph{etc}}
\newcommand{\now}{\textsc{now}}

\title{Secure Processors Part II: \\
      Intel SGX Security Analysis and MIT Sanctum Architecture}

\author{Victor Costan, Ilia Lebedev and Srinivas Devadas \\
        victor@costan.us, ilebedev@mit.edu and devadas@mit.edu \\
        \em Computer Science and Artificial Intelligence Laboratory \\
        \em Massachusetts Institute of Technology }

\begin{document}

% Define heading control sequences
\newcommand{\HeadingLevelA}[1]{\chapter{#1}}
\newcommand{\HeadingLevelB}[1]{\section{#1}}
\newcommand{\HeadingLevelC}[1]{\subsection{#1}}
\newcommand{\HeadingLevelD}[1]{\subsubsection{#1}}

% the following settings can be set or left blank at first
\copyrightowner{V.~Costan, I.~Lebedev and S.~Devadas}
\volume{11}
\issue{3}
\pubyear{2017}
\copyrightyear{2017}
\isbn{978-1-68083-302-7}
\doi{10.1561/1000000052}
\firstpage{249} %Enter the first off page number after the end of Part I. So if that is 249, this first spage is 251.
\lastpage{361}

\frontmatter  % title page, contents, catalog information

\maketitle

\tableofcontents

\mainmatter

% Abstract
\input{text/abstract.tex}

% \setcounter{page}{1} %% TYHIS IS IN text/abstract.tex

% PART 2
% Intro
\input{text/intro.tex}
% - The case for HW isolation
% - Outline SGX troubling findings
% - Our contribution
% - Enclaves ??? (again, briefly)
% SGX
% - programming model? (again, briefly?)
% - outline of findings
% - threat model
% - analysis
\input{text/sgx.tex}
% Sanctum
% -
% - Sanctum's insecure baseline: the RISCV Rocket system
% - Sanctum hardware modifications to RISCV Rocket
% - Sanctum software system
% - Security analysis
\input{text/sanctum.tex}
% Conclusion
\input{text/conclusion.tex}
% Ack
\input{text/acks.tex}

% INTRO???

%\input{text/rvx_threat.tex}

% SGX programming model, security analysis
%\input{text/sgx_intro.tex}
%\input{text/sgx_model.tex}
%\input{text/sgx_extra.tex}

% Sanctum
%\input{text/rvx_overview.tex}
%\input{text/rvx_mods.tex}
%\input{text/rvx_design.tex}
%\input{text/rvx_security.tex}
%\input{text/rvx_evaluation.tex}
%\input{text/rvx_conclusion.tex}

\backmatter  % references

\bibliographystyle{plainnat}
\bibliography{references}

\end{document}
