\hypertarget{group__BC__m}{ \section{Block ciphers} \label{group__BC__m}\index{Block ciphers@{Block ciphers}} } Collaboration diagram for Block ciphers: \nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=400pt]{group__BC__m} \end{center} \end{figure} \subsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \hyperlink{structblockCipher}{blockCipher} \begin{DoxyCompactList}\small\item\em Holds information and pointers to code specific to each cipher. \item\end{DoxyCompactList}\item struct \hyperlink{structblockCipherContext}{blockCipherContext} \begin{DoxyCompactList}\small\item\em Holds a pointer to a blockcipher as well as its parameters. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Files} \begin{DoxyCompactItemize} \item file \hyperlink{aes_8h}{aes.h} \begin{DoxyCompactList}\small\item\em AES block cipher, as specified by NIST FIPS 197. \item\end{DoxyCompactList} \item file \hyperlink{beecrypt_8h}{beecrypt.h} \begin{DoxyCompactList}\small\item\em BeeCrypt API, headers. \item\end{DoxyCompactList} \item file \hyperlink{blockmode_8h}{blockmode.h} \begin{DoxyCompactList}\small\item\em Blockcipher operation modes. \item\end{DoxyCompactList} \item file \hyperlink{blockpad_8h}{blockpad.h} \begin{DoxyCompactList}\small\item\em Blockcipher padding algorithms. \item\end{DoxyCompactList} \item file \hyperlink{blowfish_8h}{blowfish.h} \begin{DoxyCompactList}\small\item\em Blowfish block cipher. \item\end{DoxyCompactList} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef int($\ast$ \hyperlink{group__BC__m_ga4bb0a804ab2c38ac56120f1cd35600b3}{blockCipherSetup} )(\hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} $\ast$, const \hyperlink{api_8h_ab8ef12fab634c171394422d0ee8baf94}{byte} $\ast$, size\_\-t, \hyperlink{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558}{cipherOperation}) \begin{DoxyCompactList}\small\item\em Prototype definition for a setup function. \item\end{DoxyCompactList}\item typedef void \hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} \begin{DoxyCompactList}\small\item\em Placeholder type definition for blockcipher parameters. \item\end{DoxyCompactList}\item typedef int($\ast$ \hyperlink{group__BC__m_ga40aeffa20f977393fbf10378ef466c25}{blockCipherSetIV} )(\hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} $\ast$, const \hyperlink{api_8h_ab8ef12fab634c171394422d0ee8baf94}{byte} $\ast$) \begin{DoxyCompactList}\small\item\em Prototype definition for an initialization vector setup function. \item\end{DoxyCompactList}\item typedef int($\ast$ \hyperlink{group__BC__m_gae6164c8a42013a0b3aadba1bccd416af}{blockCipherSetCTR} )(\hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} $\ast$, const \hyperlink{api_8h_ab8ef12fab634c171394422d0ee8baf94}{byte} $\ast$, size\_\-t) \begin{DoxyCompactList}\small\item\em Prototype definition for an initialization vector setup function. \item\end{DoxyCompactList}\item typedef int($\ast$ \hyperlink{group__BC__m_ga49ec3da318c2c3ab4464c8dbb38617c5}{blockCipherRawcrypt} )(\hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} $\ast$, uint32\_\-t $\ast$, const uint32\_\-t $\ast$) \begin{DoxyCompactList}\small\item\em Prototype for a {\itshape raw\/} encryption or decryption function. \item\end{DoxyCompactList}\item typedef int($\ast$ \hyperlink{group__BC__m_gacc003baa6ffa4b315283282b19f081ec}{blockCipherModcrypt} )(\hyperlink{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{blockCipherParam} $\ast$, uint32\_\-t $\ast$, const uint32\_\-t $\ast$, unsigned int) \begin{DoxyCompactList}\small\item\em Prototype for a {\itshape encryption\/} or decryption function which operates on multiple blocks in a certain mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Enumerations} \begin{DoxyCompactItemize} \item enum \hyperlink{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558}{cipherOperation} \{ \hyperlink{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a8d67fb0581b95ff8d49840ebfaedffd4}{NOCRYPT}, \hyperlink{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a606f7451c00ce2831f56eceb9ab6bb96}{ENCRYPT}, \hyperlink{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a3179dbaa639c5906029876801dcf4e11}{DECRYPT} \} \begin{DoxyCompactList}\small\item\em Specifies whether to perform encryption or decryption. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Typedef Documentation} \hypertarget{group__BC__m_gacc003baa6ffa4b315283282b19f081ec}{ \index{BC\_\-m@{BC\_\-m}!blockCipherModcrypt@{blockCipherModcrypt}} \index{blockCipherModcrypt@{blockCipherModcrypt}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherModcrypt}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ {\bf blockCipherModcrypt})({\bf blockCipherParam} $\ast$bp, uint32\_\-t $\ast$dst, const uint32\_\-t $\ast$src, unsigned int nblocks)}} \label{group__BC__m_gacc003baa6ffa4b315283282b19f081ec} Prototype for a {\itshape encryption\/} or decryption function which operates on multiple blocks in a certain mode. \begin{DoxyParams}{Parameters} {\em bp} & The blockcipher's parameters. \\ \hline {\em dst} & The ciphertext address; must be aligned on 32-\/bit boundary. \\ \hline {\em src} & The cleartext address; must be aligned on 32-\/bit boundary. \\ \hline {\em nblocks} & The number of blocks to process. \\ \hline \end{DoxyParams} \begin{DoxyRetVals}{Return values} {\em 0} & on success. \\ \hline {\em -\/1} & on failure. \\ \hline \end{DoxyRetVals} \hypertarget{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0}{ \index{BC\_\-m@{BC\_\-m}!blockCipherParam@{blockCipherParam}} \index{blockCipherParam@{blockCipherParam}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherParam}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf blockCipherParam}}} \label{group__BC__m_gaa6f6ba122e489fd3c3923c83cb55dae0} Placeholder type definition for blockcipher parameters. \begin{DoxySeeAlso}{See also} \hyperlink{structaesParam}{aesParam}, \hyperlink{structblowfishParam}{blowfishParam}. \end{DoxySeeAlso} \hypertarget{group__BC__m_ga49ec3da318c2c3ab4464c8dbb38617c5}{ \index{BC\_\-m@{BC\_\-m}!blockCipherRawcrypt@{blockCipherRawcrypt}} \index{blockCipherRawcrypt@{blockCipherRawcrypt}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherRawcrypt}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ {\bf blockCipherRawcrypt})({\bf blockCipherParam} $\ast$bp, uint32\_\-t $\ast$dst, const uint32\_\-t $\ast$src)}} \label{group__BC__m_ga49ec3da318c2c3ab4464c8dbb38617c5} Prototype for a {\itshape raw\/} encryption or decryption function. \begin{DoxyParams}{Parameters} {\em bp} & The blockcipher's parameters. \\ \hline {\em dst} & The ciphertext address; must be aligned on 32-\/bit boundary. \\ \hline {\em src} & The cleartext address; must be aligned on 32-\/bit boundary. \\ \hline \end{DoxyParams} \begin{DoxyRetVals}{Return values} {\em 0} & on success. \\ \hline {\em -\/1} & on failure. \\ \hline \end{DoxyRetVals} \hypertarget{group__BC__m_gae6164c8a42013a0b3aadba1bccd416af}{ \index{BC\_\-m@{BC\_\-m}!blockCipherSetCTR@{blockCipherSetCTR}} \index{blockCipherSetCTR@{blockCipherSetCTR}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherSetCTR}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ {\bf blockCipherSetCTR})({\bf blockCipherParam} $\ast$bp, const {\bf byte} $\ast$nivz, size\_\-t counter)}} \label{group__BC__m_gae6164c8a42013a0b3aadba1bccd416af} Prototype definition for an initialization vector setup function. \begin{DoxyParams}{Parameters} {\em bp} & The blockcipher's parameters. \\ \hline {\em nivz} & The concatenation of the Nonce, IV and padding Zero bytes. \\ \hline {\em counter} & The blockciphers' counter value. \\ \hline \end{DoxyParams} \begin{DoxyNote}{Note} nivz length must be equal to the cipher's block size. \end{DoxyNote} \begin{DoxyRetVals}{Return values} {\em 0} & on success. \\ \hline {\em -\/1} & on failure. \\ \hline \end{DoxyRetVals} \hypertarget{group__BC__m_ga40aeffa20f977393fbf10378ef466c25}{ \index{BC\_\-m@{BC\_\-m}!blockCipherSetIV@{blockCipherSetIV}} \index{blockCipherSetIV@{blockCipherSetIV}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherSetIV}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ {\bf blockCipherSetIV})({\bf blockCipherParam} $\ast$bp, const {\bf byte} $\ast$iv)}} \label{group__BC__m_ga40aeffa20f977393fbf10378ef466c25} Prototype definition for an initialization vector setup function. \begin{DoxyParams}{Parameters} {\em bp} & The blockcipher's parameters. \\ \hline {\em iv} & The blockciphers' IV value. \\ \hline \end{DoxyParams} \begin{DoxyNote}{Note} iv length must be equal to the cipher's block size. \end{DoxyNote} \begin{DoxyRetVals}{Return values} {\em 0} & on success. \\ \hline {\em -\/1} & on failure. \\ \hline \end{DoxyRetVals} \hypertarget{group__BC__m_ga4bb0a804ab2c38ac56120f1cd35600b3}{ \index{BC\_\-m@{BC\_\-m}!blockCipherSetup@{blockCipherSetup}} \index{blockCipherSetup@{blockCipherSetup}!BC_m@{BC\_\-m}} \subsubsection[{blockCipherSetup}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf blockCipherSetup})({\bf blockCipherParam} $\ast$, const {\bf byte} $\ast$, size\_\-t, {\bf cipherOperation})}} \label{group__BC__m_ga4bb0a804ab2c38ac56120f1cd35600b3} Prototype definition for a setup function. \subsection{Enumeration Type Documentation} \hypertarget{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558}{ \index{BC\_\-m@{BC\_\-m}!cipherOperation@{cipherOperation}} \index{cipherOperation@{cipherOperation}!BC_m@{BC\_\-m}} \subsubsection[{cipherOperation}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf cipherOperation}}} \label{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558} Specifies whether to perform encryption or decryption. \begin{Desc} \item[Enumerator: ]\par \begin{description} \index{NOCRYPT@{NOCRYPT}!BC\_\-m@{BC\_\-m}}\index{BC\_\-m@{BC\_\-m}!NOCRYPT@{NOCRYPT}}\item[{\em \hypertarget{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a8d67fb0581b95ff8d49840ebfaedffd4}{ NOCRYPT} \label{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a8d67fb0581b95ff8d49840ebfaedffd4} }]\index{ENCRYPT@{ENCRYPT}!BC\_\-m@{BC\_\-m}}\index{BC\_\-m@{BC\_\-m}!ENCRYPT@{ENCRYPT}}\item[{\em \hypertarget{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a606f7451c00ce2831f56eceb9ab6bb96}{ ENCRYPT} \label{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a606f7451c00ce2831f56eceb9ab6bb96} }]\index{DECRYPT@{DECRYPT}!BC\_\-m@{BC\_\-m}}\index{BC\_\-m@{BC\_\-m}!DECRYPT@{DECRYPT}}\item[{\em \hypertarget{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a3179dbaa639c5906029876801dcf4e11}{ DECRYPT} \label{group__BC__m_gace10d4c0b0409d35c6a703d6445fc558a3179dbaa639c5906029876801dcf4e11} }]\end{description} \end{Desc}