Skip to content

Commit

Permalink
Spec: re-do profiles page
Browse files Browse the repository at this point in the history
 On branch dev/next-release
 Your branch is up-to-date with 'origin/dev/next-release'.

 Changes to be committed:
	modified:   doc/riscv-crypto-spec.sty
	modified:   doc/tex/sec-profiles.tex

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
  • Loading branch information
ben-marshall committed Jun 25, 2020
1 parent ae8564f commit 18fb38b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 50 deletions.
1 change: 1 addition & 0 deletions doc/riscv-crypto-spec.sty
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
\usepackage[hidelinks]{hyperref}
\usepackage{import}
\usepackage{listings}
\usepackage{multirow}
\usepackage{subcaption}
\usepackage{xcolor}
\usepackage{xspace}
Expand Down
93 changes: 43 additions & 50 deletions doc/tex/sec-profiles.tex
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@


This section describes the implementation profiles for the
Presence of the cryptography extension in any form is indicated
by bit $10$ of the {\tt MISA} CSR.
i.e. bit ``K'', because ``C'' is taken and ``K'' is for Krypto.
Table \ref{tab:profiles} describes the implementation profiles for the
Cryptography extension.
Some profiles are orthogonal to one-another, and some overlap.
Where profiles overlap, implementations with both profiles must
implement the union of both feature-sets.
Presence of the cryptography extension in any form is indicated
by bit $10$ of the {\tt MISA} CSR.
i.e. Bit ``K'', because ``C'' is taken and ``K'' is for Krypto.

\note{
All of these are yet to be finalised.
Expand All @@ -16,48 +15,42 @@
group.
}

\subsection{Scalar Profile 1}

\begin{itemize}
\item The random bit generation extension described in Section
\ref{sec:randombit}.
\item All of the Bit-manipulation instructions in
Section \ref{sec:scalar:bitmanip}.
\item The scalar SHA2 instructions described in Section
\ref{sec:scalar:sha2},
selecting the appropriate RV32 or RV64 variants.
\item The scalar AES instructions described in Section
\ref{sec:scalar:aes},
selecting the appropriate RV32 or RV64 variants.
\end{itemize}

\subsection{Scalar Profile 2}

\begin{itemize}
\item The random bit generation extension described in Section
\ref{sec:randombit}.
\item All of the Bit-manipulation instructions in
Section \ref{sec:scalar:bitmanip}.
\item The scalar SM3 instructions described in Section \ref{sec:scalar:sm3}.
\item The scalar SM4 instructions described in Section \ref{sec:scalar:sm4}.
\end{itemize}

\subsection{Vector Profile 1}

\begin{itemize}
\item The random bit generation extension.
\item All of the round-based vector AES instructions in Section
\ref{sec:vector:aes:single-round}
\item All of the round-based vector SHA2 instructions in Section
\ref{sec:vector:sha2:per-round}
\end{itemize}

\subsection{Vector Profile 2}

\begin{itemize}
\item The random bit generation extension.
\item All of the all-round vector AES instructions in Section
\ref{sec:vector:aes:all-round}
\item All of the all-round vector SHA2 instructions in Section
\ref{sec:vector:sha2:all-round}
\end{itemize}
\begin{table}[h]
\centering
\begin{tabular}{r|lll|lll}
\multirow{2}{*}{Profiles:} &
\multicolumn{3}{c|}{Scalar Profiles} &
\multicolumn{3}{c}{Vector Profiles} \\
& \#1 & \#2 & \#3 & \#1 & \#2 & \#3 \\
\hline
GetEntropy & x & x & x & x & x & x \\
Bitmanip Instructions & x & x & x & & & \\
Scalar SHA2 & x & & x & & & \\
Scalar AES & x & & x & & & \\
Scalar SM3 & & x & x & & & \\
Scalar SM4 & & x & x & & & \\
\hline
Vector AES Per-Round & & & & x & & x \\
Vector AES All-Round & & & & x & & x \\
Vector SHA2 Per-Round & & & & & x & x \\
Vector SHA2 All-Round & & & & & x & x
\end{tabular}
\caption{
Implementation profiles for the Cryptography extension.
}
\label{tab:profiles}
\end{table}

The scalar profiles all implement the GetEntropy feature and
shared Bitmanip instructions.
Profile $1$ includes the scalar AES/SHA2 extensions, while
Profile $2$ includes the scalar SM3/SM4 extensions.
These were chosen as the most likely to be mutually exclusive in final
products.
Profile $3$ implements all of the scalar features.

The vector profiles are split into the ``per-round'' instructions
(Profile 1),
the ``all-round'' instructions (Profile 2),
or both (Profile 3).
All vector profiles implement the GetEntropy feature.

0 comments on commit 18fb38b

Please sign in to comment.