\doxysection{src/gsm/milenage/aes.h File Reference}
\label{aes_8h}\index{src/gsm/milenage/aes.h@{src/gsm/milenage/aes.h}}


AES functions.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ AES\+\_\+\+BLOCK\+\_\+\+SIZE}~16
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \textbf{ aes\+\_\+encrypt\+\_\+init} (const \textbf{ u8} $\ast$key, size\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em aes\+\_\+encrypt\+\_\+init -\/ Initialize AES for encryption @key\+: Encryption key @len\+: Key length in bytes (usually 16, i.\+e., 128 bits) Returns\+: Pointer to context data or NULL on failure \end{DoxyCompactList}\item 
void \textbf{ aes\+\_\+encrypt} (void $\ast$ctx, const \textbf{ u8} $\ast$plain, \textbf{ u8} $\ast$crypt)
\begin{DoxyCompactList}\small\item\em aes\+\_\+encrypt -\/ Encrypt one AES block @ctx\+: Context pointer from \doxyref{aes\+\_\+encrypt\+\_\+init()}{p.}{kdf_2crypto_8h_a343a371ec5ee6a3785da74796bb25bc4} @plain\+: Plaintext data to be encrypted (16 bytes) @crypt\+: Buffer for the encrypted data (16 bytes) \end{DoxyCompactList}\item 
void \textbf{ aes\+\_\+encrypt\+\_\+deinit} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em aes\+\_\+encrypt\+\_\+deinit -\/ Deinitialize AES encryption @ctx\+: Context pointer from \doxyref{aes\+\_\+encrypt\+\_\+init()}{p.}{kdf_2crypto_8h_a343a371ec5ee6a3785da74796bb25bc4} \end{DoxyCompactList}\item 
void $\ast$ \textbf{ aes\+\_\+decrypt\+\_\+init} (const \textbf{ u8} $\ast$key, size\+\_\+t \textbf{ len})
\item 
void \textbf{ aes\+\_\+decrypt} (void $\ast$ctx, const \textbf{ u8} $\ast$crypt, \textbf{ u8} $\ast$plain)
\item 
void \textbf{ aes\+\_\+decrypt\+\_\+deinit} (void $\ast$ctx)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
AES functions. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{aes_8h_af19ab913a847ad1e91c5291215116de1}} 
\index{aes.h@{aes.h}!AES\_BLOCK\_SIZE@{AES\_BLOCK\_SIZE}}
\index{AES\_BLOCK\_SIZE@{AES\_BLOCK\_SIZE}!aes.h@{aes.h}}
\doxysubsubsection{AES\_BLOCK\_SIZE}
{\footnotesize\ttfamily \#define AES\+\_\+\+BLOCK\+\_\+\+SIZE~16}



\doxysubsection{Function Documentation}
\mbox{\label{aes_8h_adb9aa3132c2799cd2623de4daf9ef714}} 
\index{aes.h@{aes.h}!aes\_decrypt@{aes\_decrypt}}
\index{aes\_decrypt@{aes\_decrypt}!aes.h@{aes.h}}
\doxysubsubsection{aes\_decrypt()}
{\footnotesize\ttfamily void aes\+\_\+decrypt (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const \textbf{ u8} $\ast$}]{crypt,  }\item[{\textbf{ u8} $\ast$}]{plain }\end{DoxyParamCaption})}

\mbox{\label{aes_8h_ac52e91f8bc091ad5e45cbb557a8abfb9}} 
\index{aes.h@{aes.h}!aes\_decrypt\_deinit@{aes\_decrypt\_deinit}}
\index{aes\_decrypt\_deinit@{aes\_decrypt\_deinit}!aes.h@{aes.h}}
\doxysubsubsection{aes\_decrypt\_deinit()}
{\footnotesize\ttfamily void aes\+\_\+decrypt\+\_\+deinit (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}

\mbox{\label{aes_8h_aeffbce75537e7a819960ad21a7e32961}} 
\index{aes.h@{aes.h}!aes\_decrypt\_init@{aes\_decrypt\_init}}
\index{aes\_decrypt\_init@{aes\_decrypt\_init}!aes.h@{aes.h}}
\doxysubsubsection{aes\_decrypt\_init()}
{\footnotesize\ttfamily void $\ast$ aes\+\_\+decrypt\+\_\+init (\begin{DoxyParamCaption}\item[{const \textbf{ u8} $\ast$}]{key,  }\item[{size\+\_\+t}]{len }\end{DoxyParamCaption})}

\mbox{\label{aes_8h_ab5d5144d5ff65df3a2141b61aa8cbbc5}} 
\index{aes.h@{aes.h}!aes\_encrypt@{aes\_encrypt}}
\index{aes\_encrypt@{aes\_encrypt}!aes.h@{aes.h}}
\doxysubsubsection{aes\_encrypt()}
{\footnotesize\ttfamily void aes\+\_\+encrypt (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const \textbf{ u8} $\ast$}]{plain,  }\item[{\textbf{ u8} $\ast$}]{crypt }\end{DoxyParamCaption})}



aes\+\_\+encrypt -\/ Encrypt one AES block @ctx\+: Context pointer from \doxyref{aes\+\_\+encrypt\+\_\+init()}{p.}{kdf_2crypto_8h_a343a371ec5ee6a3785da74796bb25bc4} @plain\+: Plaintext data to be encrypted (16 bytes) @crypt\+: Buffer for the encrypted data (16 bytes) 

\mbox{\label{aes_8h_a3de4d709c14b6f0801604d37fde3306a}} 
\index{aes.h@{aes.h}!aes\_encrypt\_deinit@{aes\_encrypt\_deinit}}
\index{aes\_encrypt\_deinit@{aes\_encrypt\_deinit}!aes.h@{aes.h}}
\doxysubsubsection{aes\_encrypt\_deinit()}
{\footnotesize\ttfamily void aes\+\_\+encrypt\+\_\+deinit (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}



aes\+\_\+encrypt\+\_\+deinit -\/ Deinitialize AES encryption @ctx\+: Context pointer from \doxyref{aes\+\_\+encrypt\+\_\+init()}{p.}{kdf_2crypto_8h_a343a371ec5ee6a3785da74796bb25bc4} 

\mbox{\label{aes_8h_a343a371ec5ee6a3785da74796bb25bc4}} 
\index{aes.h@{aes.h}!aes\_encrypt\_init@{aes\_encrypt\_init}}
\index{aes\_encrypt\_init@{aes\_encrypt\_init}!aes.h@{aes.h}}
\doxysubsubsection{aes\_encrypt\_init()}
{\footnotesize\ttfamily void $\ast$ aes\+\_\+encrypt\+\_\+init (\begin{DoxyParamCaption}\item[{const \textbf{ u8} $\ast$}]{key,  }\item[{size\+\_\+t}]{len }\end{DoxyParamCaption})}



aes\+\_\+encrypt\+\_\+init -\/ Initialize AES for encryption @key\+: Encryption key @len\+: Key length in bytes (usually 16, i.\+e., 128 bits) Returns\+: Pointer to context data or NULL on failure 

