\hypertarget{group__crypto}{
\section{crypto: Cryptographic routines}
\label{group__crypto}\index{crypto: Cryptographic routines@{crypto: Cryptographic routines}}
}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{group__crypto_g56e01db1767174c4359ae51c7b77739c}{SURF\_\-OUT\_\-U32}~8
\item 
\#define \hyperlink{group__crypto_g80bb1afcac12078eb93f38a507e28196}{SURF\_\-IN\_\-U32}~12
\item 
\#define \hyperlink{group__crypto_gb557630b9a4844d6b0323def2be8e45c}{SURF\_\-SEED\_\-U32}~32
\item 
\#define \hyperlink{group__crypto_gda3fd98f7f26a8c20d926da44dfbc1c4}{SURF\_\-OUT}~32
\item 
\#define \hyperlink{group__crypto_g9d68135a00f183d21702742b22f96b5e}{SURF\_\-IN}~48
\item 
\#define \hyperlink{group__crypto_g64048d6cfc3aa02d819c0f43290fe202}{SURF\_\-SEED}~128
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{group__crypto_gcf891244c9dc004ef62b51eadedf48d6}{surf} (uint32 out\mbox{[}8\mbox{]}, const uint32 in\mbox{[}12\mbox{]}, const uint32 seed\mbox{[}32\mbox{]})
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{group__crypto_g9d68135a00f183d21702742b22f96b5e}{
\index{crypto@{crypto}!SURF\_\-IN@{SURF\_\-IN}}
\index{SURF\_\-IN@{SURF\_\-IN}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-IN~48}}
\label{group__crypto_g9d68135a00f183d21702742b22f96b5e}


The number of bytes used as input by surf \hypertarget{group__crypto_g80bb1afcac12078eb93f38a507e28196}{
\index{crypto@{crypto}!SURF\_\-IN\_\-U32@{SURF\_\-IN\_\-U32}}
\index{SURF\_\-IN\_\-U32@{SURF\_\-IN\_\-U32}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-IN\_\-U32~12}}
\label{group__crypto_g80bb1afcac12078eb93f38a507e28196}


The number of 32-bit words used as input by surf \hypertarget{group__crypto_gda3fd98f7f26a8c20d926da44dfbc1c4}{
\index{crypto@{crypto}!SURF\_\-OUT@{SURF\_\-OUT}}
\index{SURF\_\-OUT@{SURF\_\-OUT}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-OUT~32}}
\label{group__crypto_gda3fd98f7f26a8c20d926da44dfbc1c4}


The number of bytes output by surf \hypertarget{group__crypto_g56e01db1767174c4359ae51c7b77739c}{
\index{crypto@{crypto}!SURF\_\-OUT\_\-U32@{SURF\_\-OUT\_\-U32}}
\index{SURF\_\-OUT\_\-U32@{SURF\_\-OUT\_\-U32}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-OUT\_\-U32~8}}
\label{group__crypto_g56e01db1767174c4359ae51c7b77739c}


The number of 32-bit words output by surf \hypertarget{group__crypto_g64048d6cfc3aa02d819c0f43290fe202}{
\index{crypto@{crypto}!SURF\_\-SEED@{SURF\_\-SEED}}
\index{SURF\_\-SEED@{SURF\_\-SEED}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-SEED~128}}
\label{group__crypto_g64048d6cfc3aa02d819c0f43290fe202}


The number of bytes used as seed data by surf \hypertarget{group__crypto_gb557630b9a4844d6b0323def2be8e45c}{
\index{crypto@{crypto}!SURF\_\-SEED\_\-U32@{SURF\_\-SEED\_\-U32}}
\index{SURF\_\-SEED\_\-U32@{SURF\_\-SEED\_\-U32}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SURF\_\-SEED\_\-U32~32}}
\label{group__crypto_gb557630b9a4844d6b0323def2be8e45c}


The number of 32-bit words used as seed data by surf 

\subsection{Function Documentation}
\hypertarget{group__crypto_gcf891244c9dc004ef62b51eadedf48d6}{
\index{crypto@{crypto}!surf@{surf}}
\index{surf@{surf}!crypto@{crypto}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void surf (uint32 {\em out}\mbox{[}8\mbox{]}, const uint32 {\em in}\mbox{[}12\mbox{]}, const uint32 {\em seed}\mbox{[}32\mbox{]})}}
\label{group__crypto_gcf891244c9dc004ef62b51eadedf48d6}


Simple Unpredictable Random Function

This function converts a 384-bit input into a 256-bit output, given a 1024-bit seed k. When k is secret and uniformly selected, surf(k) seems to be indistinguishable from a uniformly selected 384-bit-to-256-bit function.

See \href{http://cr.yp.to/papers/surf.ps}{\tt http://cr.yp.to/papers/surf.ps} This implementation was derived from this paper and from \hyperlink{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}{dns\_\-random.c} from djbdns-1.05, which was made public domain as per \href{http://cr.yp.to/distributors.html}{\tt http://cr.yp.to/distributors.html} on 2007-12-28. 