\doxysection{Crypto}
\label{group__crypto}\index{Crypto@{Crypto}}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static \textbf{ LLIST\+\_\+\+HEAD} (gprs\+\_\+ciphers)
\item 
int \textbf{ gprs\+\_\+cipher\+\_\+register} (struct \textbf{ gprs\+\_\+cipher\+\_\+impl} $\ast$ciph)
\item 
int \textbf{ gprs\+\_\+cipher\+\_\+load} (const char $\ast$path)
\item 
int \textbf{ gprs\+\_\+cipher\+\_\+run} (uint8\+\_\+t $\ast$out, uint16\+\_\+t \textbf{ len}, enum \textbf{ gprs\+\_\+ciph\+\_\+algo} algo, uint8\+\_\+t $\ast$kc, uint32\+\_\+t iv, enum \textbf{ gprs\+\_\+cipher\+\_\+direction} dir)
\item 
unsigned \textbf{ gprs\+\_\+cipher\+\_\+key\+\_\+length} (enum \textbf{ gprs\+\_\+ciph\+\_\+algo} algo)
\begin{DoxyCompactList}\small\item\em Obtain key lenght for given GPRS cipher. \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+cipher\+\_\+supported} (enum \textbf{ gprs\+\_\+ciph\+\_\+algo} algo)
\item 
uint32\+\_\+t \textbf{ gprs\+\_\+cipher\+\_\+gen\+\_\+input\+\_\+ui} (uint32\+\_\+t iov\+\_\+ui, uint8\+\_\+t sapi, uint32\+\_\+t lfn, uint32\+\_\+t oc)
\item 
uint32\+\_\+t \textbf{ gprs\+\_\+cipher\+\_\+gen\+\_\+input\+\_\+i} (uint32\+\_\+t iov\+\_\+i, uint32\+\_\+t lfn, uint32\+\_\+t oc)
\item 
static \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((constructor))
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static struct \textbf{ gprs\+\_\+cipher\+\_\+impl} $\ast$ \textbf{ selected\+\_\+ciphers} [\textbf{ \+\_\+\+GPRS\+\_\+\+ALGO\+\_\+\+NUM}]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+cipher\+\_\+names} [$\,$]
\item 
static struct \textbf{ gprs\+\_\+cipher\+\_\+impl} \textbf{ gea3\+\_\+impl}
\item 
static struct \textbf{ gprs\+\_\+cipher\+\_\+impl} \textbf{ gea4\+\_\+impl}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__crypto_ga9ed16867a9394d9ccf1132194edae298}} 
\index{Crypto@{Crypto}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!Crypto@{Crypto}}
\doxysubsubsection{\_\_attribute\_\_()}
{\footnotesize\ttfamily static \+\_\+\+\_\+attribute\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{(constructor)}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ gea3\+\_\+impl}, \textbf{ gea4\+\_\+impl}, and \textbf{ gprs\+\_\+cipher\+\_\+register()}.

\mbox{\label{group__crypto_gae91d5d451e56ff9bd758d5aaea2ae88b}} 
\index{Crypto@{Crypto}!gprs\_cipher\_gen\_input\_i@{gprs\_cipher\_gen\_input\_i}}
\index{gprs\_cipher\_gen\_input\_i@{gprs\_cipher\_gen\_input\_i}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_gen\_input\_i()}
{\footnotesize\ttfamily uint32\+\_\+t gprs\+\_\+cipher\+\_\+gen\+\_\+input\+\_\+i (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{iov\+\_\+i,  }\item[{uint32\+\_\+t}]{lfn,  }\item[{uint32\+\_\+t}]{oc }\end{DoxyParamCaption})}

\mbox{\label{group__crypto_ga3d7f0f1b48be62a13d1601cd0798fe9a}} 
\index{Crypto@{Crypto}!gprs\_cipher\_gen\_input\_ui@{gprs\_cipher\_gen\_input\_ui}}
\index{gprs\_cipher\_gen\_input\_ui@{gprs\_cipher\_gen\_input\_ui}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_gen\_input\_ui()}
{\footnotesize\ttfamily uint32\+\_\+t gprs\+\_\+cipher\+\_\+gen\+\_\+input\+\_\+ui (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{iov\+\_\+ui,  }\item[{uint8\+\_\+t}]{sapi,  }\item[{uint32\+\_\+t}]{lfn,  }\item[{uint32\+\_\+t}]{oc }\end{DoxyParamCaption})}

\mbox{\label{group__crypto_ga53a4d4c6ebb7a4c7a0b77d0059b186f3}} 
\index{Crypto@{Crypto}!gprs\_cipher\_key\_length@{gprs\_cipher\_key\_length}}
\index{gprs\_cipher\_key\_length@{gprs\_cipher\_key\_length}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_key\_length()}
{\footnotesize\ttfamily unsigned gprs\+\_\+cipher\+\_\+key\+\_\+length (\begin{DoxyParamCaption}\item[{enum \textbf{ gprs\+\_\+ciph\+\_\+algo}}]{algo }\end{DoxyParamCaption})}



Obtain key lenght for given GPRS cipher. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em algo} & Enum representive GPRS cipher \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
unsigned integer key length for supported algorithms, for GEA0 and unknown ciphers will return 0 
\end{DoxyReturn}


References \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA0}, \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA1}, \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA2}, \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA3}, and \textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA4}.



Referenced by \textbf{ gea3()}.

\mbox{\label{group__crypto_gac78b8258df0b1e869e3e3434a8b22851}} 
\index{Crypto@{Crypto}!gprs\_cipher\_load@{gprs\_cipher\_load}}
\index{gprs\_cipher\_load@{gprs\_cipher\_load}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_load()}
{\footnotesize\ttfamily int gprs\+\_\+cipher\+\_\+load (\begin{DoxyParamCaption}\item[{const char $\ast$}]{path }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+plugin\+\_\+load\+\_\+all()}.

\mbox{\label{group__crypto_gaab0d03f7b3873bdd7a2e83fd7244cf8b}} 
\index{Crypto@{Crypto}!gprs\_cipher\_register@{gprs\_cipher\_register}}
\index{gprs\_cipher\_register@{gprs\_cipher\_register}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_register()}
{\footnotesize\ttfamily int gprs\+\_\+cipher\+\_\+register (\begin{DoxyParamCaption}\item[{struct \textbf{ gprs\+\_\+cipher\+\_\+impl} $\ast$}]{ciph }\end{DoxyParamCaption})}



References \textbf{ gprs\+\_\+cipher\+\_\+impl\+::algo}, \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ gprs\+\_\+cipher\+\_\+impl\+::list}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ gprs\+\_\+cipher\+\_\+impl\+::priority}, and \textbf{ selected\+\_\+ciphers}.



Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}.

\mbox{\label{group__crypto_ga6c427c539685a9e6d89faacd4c37864b}} 
\index{Crypto@{Crypto}!gprs\_cipher\_run@{gprs\_cipher\_run}}
\index{gprs\_cipher\_run@{gprs\_cipher\_run}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_run()}
{\footnotesize\ttfamily int gprs\+\_\+cipher\+\_\+run (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{out,  }\item[{uint16\+\_\+t}]{len,  }\item[{enum \textbf{ gprs\+\_\+ciph\+\_\+algo}}]{algo,  }\item[{uint8\+\_\+t $\ast$}]{kc,  }\item[{uint32\+\_\+t}]{iv,  }\item[{enum \textbf{ gprs\+\_\+cipher\+\_\+direction}}]{dir }\end{DoxyParamCaption})}



References \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ GSM0464\+\_\+\+CIPH\+\_\+\+MAX\+\_\+\+BLOCK}, \textbf{ len}, \textbf{ gprs\+\_\+cipher\+\_\+impl\+::run}, and \textbf{ selected\+\_\+ciphers}.

\mbox{\label{group__crypto_ga6e4f4fadd0c4172afffca74a3bc92ab7}} 
\index{Crypto@{Crypto}!gprs\_cipher\_supported@{gprs\_cipher\_supported}}
\index{gprs\_cipher\_supported@{gprs\_cipher\_supported}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_supported()}
{\footnotesize\ttfamily int gprs\+\_\+cipher\+\_\+supported (\begin{DoxyParamCaption}\item[{enum \textbf{ gprs\+\_\+ciph\+\_\+algo}}]{algo }\end{DoxyParamCaption})}



References \textbf{ ARRAY\+\_\+\+SIZE}, and \textbf{ selected\+\_\+ciphers}.

\mbox{\label{group__crypto_ga6ccee4fadd92ae56cad3e132b38eed15}} 
\index{Crypto@{Crypto}!LLIST\_HEAD@{LLIST\_HEAD}}
\index{LLIST\_HEAD@{LLIST\_HEAD}!Crypto@{Crypto}}
\doxysubsubsection{LLIST\_HEAD()}
{\footnotesize\ttfamily static LLIST\+\_\+\+HEAD (\begin{DoxyParamCaption}\item[{gprs\+\_\+ciphers}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



\doxysubsection{Variable Documentation}
\mbox{\label{group__crypto_ga24d8f4628ed085c52eb576bdbea9bfd6}} 
\index{Crypto@{Crypto}!gea3\_impl@{gea3\_impl}}
\index{gea3\_impl@{gea3\_impl}!Crypto@{Crypto}}
\doxysubsubsection{gea3\_impl}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+cipher\+\_\+impl} gea3\+\_\+impl\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .algo = GPRS\_ALGO\_GEA3,}
\DoxyCodeLine{        .name = \textcolor{stringliteral}{"{}GEA3 (libosmogsm built-\/in)"{}},}
\DoxyCodeLine{        .priority = 100,}
\DoxyCodeLine{        .run = \&gea3,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}.

\mbox{\label{group__crypto_ga87776892046298f9bd34285d4227d1ab}} 
\index{Crypto@{Crypto}!gea4\_impl@{gea4\_impl}}
\index{gea4\_impl@{gea4\_impl}!Crypto@{Crypto}}
\doxysubsubsection{gea4\_impl}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+cipher\+\_\+impl} gea4\+\_\+impl\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        .algo = GPRS\_ALGO\_GEA4,}
\DoxyCodeLine{        .name = \textcolor{stringliteral}{"{}GEA4 (libosmogsm built-\/in)"{}},}
\DoxyCodeLine{        .priority = 100,}
\DoxyCodeLine{        .run = \&gea4,}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+()}.

\mbox{\label{group__crypto_ga99cd5359808880036a8e7258f1edfb5f}} 
\index{Crypto@{Crypto}!gprs\_cipher\_names@{gprs\_cipher\_names}}
\index{gprs\_cipher\_names@{gprs\_cipher\_names}!Crypto@{Crypto}}
\doxysubsubsection{gprs\_cipher\_names}
{\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} gprs\+\_\+cipher\+\_\+names[$\,$]}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ GPRS\_ALGO\_GEA0, \textcolor{stringliteral}{"{}GEA0"{}} \},}
\DoxyCodeLine{        \{ GPRS\_ALGO\_GEA1, \textcolor{stringliteral}{"{}GEA1"{}} \},}
\DoxyCodeLine{        \{ GPRS\_ALGO\_GEA2, \textcolor{stringliteral}{"{}GEA2"{}} \},}
\DoxyCodeLine{        \{ GPRS\_ALGO\_GEA3, \textcolor{stringliteral}{"{}GEA3"{}} \},}
\DoxyCodeLine{        \{ GPRS\_ALGO\_GEA4, \textcolor{stringliteral}{"{}GEA4"{}} \},}
\DoxyCodeLine{        \{ 0, NULL \},}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{group__crypto_ga1ea6c3b290d0b4a61e8823a950042956}} 
\index{Crypto@{Crypto}!selected\_ciphers@{selected\_ciphers}}
\index{selected\_ciphers@{selected\_ciphers}!Crypto@{Crypto}}
\doxysubsubsection{selected\_ciphers}
{\footnotesize\ttfamily struct \textbf{ gprs\+\_\+cipher\+\_\+impl}$\ast$ selected\+\_\+ciphers[\textbf{ \+\_\+\+GPRS\+\_\+\+ALGO\+\_\+\+NUM}]\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ gprs\+\_\+cipher\+\_\+register()}, \textbf{ gprs\+\_\+cipher\+\_\+run()}, and \textbf{ gprs\+\_\+cipher\+\_\+supported()}.

