\doxysection{GPRS GEA3/\+GEA4 ciphering algorithm}
\label{group__gea}\index{GPRS GEA3/GEA4 ciphering algorithm@{GPRS GEA3/GEA4 ciphering algorithm}}


Implementation of GPRS Ciphers GEA3 and GEA4.  


\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ gea.\+h}
\begin{DoxyCompactList}\small\item\em GEA3/\+GEA4 header. \end{DoxyCompactList}\item 
file \textbf{ gea.\+c}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ gea3} (uint8\+\_\+t $\ast$out, uint16\+\_\+t \textbf{ len}, uint8\+\_\+t $\ast$kc, uint32\+\_\+t iv, enum \textbf{ gprs\+\_\+cipher\+\_\+direction} direction)
\begin{DoxyCompactList}\small\item\em Performs the GEA3 algorithm as in 3GPP TS 55.\+216 V6.\+2.\+0. \end{DoxyCompactList}\item 
int \textbf{ gea4} (uint8\+\_\+t $\ast$out, uint16\+\_\+t \textbf{ len}, uint8\+\_\+t $\ast$kc, uint32\+\_\+t iv, enum \textbf{ gprs\+\_\+cipher\+\_\+direction} direction)
\begin{DoxyCompactList}\small\item\em Performs the GEA4 algorithm as in 3GPP TS 55.\+226 V9.\+0.\+0. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Implementation of GPRS Ciphers GEA3 and GEA4. 



\doxysubsection{Function Documentation}
\mbox{\label{group__gea_ga7b4049205a856b27f50340dcfa9d3f40}} 
\index{GPRS GEA3/GEA4 ciphering algorithm@{GPRS GEA3/GEA4 ciphering algorithm}!gea3@{gea3}}
\index{gea3@{gea3}!GPRS GEA3/GEA4 ciphering algorithm@{GPRS GEA3/GEA4 ciphering algorithm}}
\doxysubsubsection{gea3()}
{\footnotesize\ttfamily int gea3 (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{out,  }\item[{uint16\+\_\+t}]{len,  }\item[{uint8\+\_\+t $\ast$}]{kc,  }\item[{uint32\+\_\+t}]{iv,  }\item[{enum \textbf{ gprs\+\_\+cipher\+\_\+direction}}]{direction }\end{DoxyParamCaption})}



Performs the GEA3 algorithm as in 3GPP TS 55.\+216 V6.\+2.\+0. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em out} & Buffer for gamma for encrypted/decrypted \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of out, in bytes \\
\hline
\mbox{\texttt{ in}}  & {\em kc} & Buffer with the ciphering key \\
\hline
\mbox{\texttt{ in}}  & {\em iv} & Init vector \\
\hline
\mbox{\texttt{ in}}  & {\em direct} & Direction\+: 0 (MS -\/$>$ SGSN) or 1 (SGSN -\/$>$ MS) \\
\hline
\end{DoxyParams}


References \textbf{ gea4()}, \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA4}, \textbf{ gprs\+\_\+cipher\+\_\+key\+\_\+length()}, \textbf{ len}, and \textbf{ osmo\+\_\+c4()}.

\mbox{\label{group__gea_ga8e50bc11ef1d19afa596752592e5499e}} 
\index{GPRS GEA3/GEA4 ciphering algorithm@{GPRS GEA3/GEA4 ciphering algorithm}!gea4@{gea4}}
\index{gea4@{gea4}!GPRS GEA3/GEA4 ciphering algorithm@{GPRS GEA3/GEA4 ciphering algorithm}}
\doxysubsubsection{gea4()}
{\footnotesize\ttfamily int gea4 (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{out,  }\item[{uint16\+\_\+t}]{len,  }\item[{uint8\+\_\+t $\ast$}]{kc,  }\item[{uint32\+\_\+t}]{iv,  }\item[{enum \textbf{ gprs\+\_\+cipher\+\_\+direction}}]{direction }\end{DoxyParamCaption})}



Performs the GEA4 algorithm as in 3GPP TS 55.\+226 V9.\+0.\+0. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em out} & Buffer for gamma for encrypted/decrypted \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of out, in bytes \\
\hline
\mbox{\texttt{ in}}  & {\em kc} & Buffer with the ciphering key \\
\hline
\mbox{\texttt{ in}}  & {\em iv} & Init vector \\
\hline
\mbox{\texttt{ in}}  & {\em direct} & Direction\+: 0 (MS -\/$>$ SGSN) or 1 (SGSN -\/$>$ MS) \\
\hline
\end{DoxyParams}


References \textbf{ \+\_\+kasumi\+\_\+kgcore()}, and \textbf{ len}.



Referenced by \textbf{ gea3()}.

