Skip to content

Commit 2c487a2

Browse files
committed
Update docs.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent e33128e commit 2c487a2

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

doc/crypt.tex

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3075,10 +3075,27 @@ \subsection{Hash Registration}
30753075
}
30763076
\end{verbatim}
30773077

3078-
\mysection{SHA3 SHAKE}
3078+
\mysection{Extendable Output Functions (XOF)}
3079+
Some algorithms provide a special XOF (Extendable Output Functions) mode which allow to generate message digests of an arbitrary length.
3080+
3081+
The library supports the following XOFs.
3082+
3083+
\subsection{SHA3 SHAKE}
30793084
The SHA3 class of algorithms provides a special XOF (Extendable Output Functions) mode, called SHAKE.
30803085
SHAKE operates in 2 security configurations, 128bit or 256bit, and allows to generate message digests of an arbitrary length.
30813086

3087+
The API functions are as follows.
3088+
3089+
\begin{small}
3090+
\begin{verbatim}
3091+
int sha3_shake_init(hash_state *md, int num);
3092+
int sha3_shake_process(hash_state * md, const unsigned char *in, unsigned long inlen);
3093+
int sha3_shake_done(hash_state *md, unsigned char *out, unsigned long outlen);
3094+
\end{verbatim}
3095+
\end{small}
3096+
3097+
The process function \code{sha3\_shake\_process()} is implemented as a macro which calls \code{sha3\_process()}.
3098+
30823099
For further information see \url{https://en.wikipedia.org/wiki/SHA-3}
30833100

30843101
Example of using SHAKE256 with an arbitrary length output.
@@ -3110,6 +3127,22 @@ \subsection{Hash Registration}
31103127
\end{verbatim}
31113128
\end{small}
31123129

3130+
\subsection{TurboSHAKE}
3131+
Another variation of SHA3 SHAKE is TurboSHAKE, which has been specified in \href{https://datatracker.ietf.org/doc/rfc9861/}{\texttt{RFC 9861}}.
3132+
3133+
The API works equivalent to the one of SHA3 SHAKE, where the APIs only have a different name.
3134+
3135+
\begin{small}
3136+
\begin{verbatim}
3137+
int turbo_shake_init(hash_state *md, int num);
3138+
int turbo_shake_process(hash_state *md, const unsigned char *in, unsigned long inlen);
3139+
int turbo_shake_done(hash_state *md, unsigned char *out, unsigned long outlen);
3140+
\end{verbatim}
3141+
\end{small}
3142+
3143+
The init function \code{turbo\_shake\_init()} is implemented as a macro which calls \code{sha3\_shake\_init()}.
3144+
3145+
31133146
\mysection{Extended Tiger API}
31143147

31153148
The Tiger and Tiger2 hash algorithms \url{http://www.cs.technion.ac.il/~biham/Reports/Tiger/} specify the possibility to run the algorithm with

0 commit comments

Comments
 (0)