\doxysection{include/osmocom/crypt/gprs\+\_\+cipher.h File Reference}
\label{gprs__cipher_8h}\index{include/osmocom/crypt/gprs\_cipher.h@{include/osmocom/crypt/gprs\_cipher.h}}
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gprs\+\_\+cipher\+\_\+impl}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ GSM0464\+\_\+\+CIPH\+\_\+\+MAX\+\_\+\+BLOCK}~1523
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ gprs\+\_\+ciph\+\_\+algo} \{ \newline
\textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA0} = 0
, \newline
\textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA1} = 1
, \newline
\textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA2} = 2
, \newline
\textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA3} = 3
, \newline
\textbf{ GPRS\+\_\+\+ALGO\+\_\+\+GEA4} = 4
, \newline
\textbf{ \+\_\+\+GPRS\+\_\+\+ALGO\+\_\+\+NUM}
 \}
\item 
enum \textbf{ gprs\+\_\+cipher\+\_\+direction} \{ \newline
\textbf{ GPRS\+\_\+\+CIPH\+\_\+\+MS2\+SGSN} = 0
, \newline
\textbf{ GPRS\+\_\+\+CIPH\+\_\+\+SGSN2\+MS} = 1
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\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 
int \textbf{ gprs\+\_\+cipher\+\_\+supported} (enum \textbf{ gprs\+\_\+ciph\+\_\+algo} algo)
\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 
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)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gprs\+\_\+cipher\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{gprs__cipher_8h_a1b193876faac84f5a4443adda4a4b556}} 
\index{gprs\_cipher.h@{gprs\_cipher.h}!GSM0464\_CIPH\_MAX\_BLOCK@{GSM0464\_CIPH\_MAX\_BLOCK}}
\index{GSM0464\_CIPH\_MAX\_BLOCK@{GSM0464\_CIPH\_MAX\_BLOCK}!gprs\_cipher.h@{gprs\_cipher.h}}
\doxysubsubsection{GSM0464\_CIPH\_MAX\_BLOCK}
{\footnotesize\ttfamily \#define GSM0464\+\_\+\+CIPH\+\_\+\+MAX\+\_\+\+BLOCK~1523}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80}} 
\index{gprs\_cipher.h@{gprs\_cipher.h}!gprs\_ciph\_algo@{gprs\_ciph\_algo}}
\index{gprs\_ciph\_algo@{gprs\_ciph\_algo}!gprs\_cipher.h@{gprs\_cipher.h}}
\doxysubsubsection{gprs\_ciph\_algo}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+ciph\+\_\+algo}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_ALGO\_GEA0@{GPRS\_ALGO\_GEA0}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_ALGO\_GEA0@{GPRS\_ALGO\_GEA0}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80af5d5e9cebf0b91a24538cdadb0ab3560}} 
GPRS\+\_\+\+ALGO\+\_\+\+GEA0&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_ALGO\_GEA1@{GPRS\_ALGO\_GEA1}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_ALGO\_GEA1@{GPRS\_ALGO\_GEA1}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80a13f2c9753f3a95dffae929aa8aacb2ac}} 
GPRS\+\_\+\+ALGO\+\_\+\+GEA1&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_ALGO\_GEA2@{GPRS\_ALGO\_GEA2}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_ALGO\_GEA2@{GPRS\_ALGO\_GEA2}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80adc307e8a61fc2021635af54940172699}} 
GPRS\+\_\+\+ALGO\+\_\+\+GEA2&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_ALGO\_GEA3@{GPRS\_ALGO\_GEA3}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_ALGO\_GEA3@{GPRS\_ALGO\_GEA3}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80a3aa7573c6cad9c0b8cd629abe6b35f8c}} 
GPRS\+\_\+\+ALGO\+\_\+\+GEA3&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_ALGO\_GEA4@{GPRS\_ALGO\_GEA4}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_ALGO\_GEA4@{GPRS\_ALGO\_GEA4}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80ac58fcc17e0c592e06f90c57e912e91fc}} 
GPRS\+\_\+\+ALGO\+\_\+\+GEA4&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{\_GPRS\_ALGO\_NUM@{\_GPRS\_ALGO\_NUM}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!\_GPRS\_ALGO\_NUM@{\_GPRS\_ALGO\_NUM}}}\mbox{\label{gprs__cipher_8h_a09965b7fcd9fe8cb9940f9aa3273bc80a3b2f015fe1b5dd93d70955f83d9cdf50}} 
\+\_\+\+GPRS\+\_\+\+ALGO\+\_\+\+NUM&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{gprs__cipher_8h_a3d9c294e932f80539f1ee86ceb5d9b50}} 
\index{gprs\_cipher.h@{gprs\_cipher.h}!gprs\_cipher\_direction@{gprs\_cipher\_direction}}
\index{gprs\_cipher\_direction@{gprs\_cipher\_direction}!gprs\_cipher.h@{gprs\_cipher.h}}
\doxysubsubsection{gprs\_cipher\_direction}
{\footnotesize\ttfamily enum \textbf{ gprs\+\_\+cipher\+\_\+direction}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_CIPH\_MS2SGSN@{GPRS\_CIPH\_MS2SGSN}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_CIPH\_MS2SGSN@{GPRS\_CIPH\_MS2SGSN}}}\mbox{\label{gprs__cipher_8h_a3d9c294e932f80539f1ee86ceb5d9b50a1b8d239049c9268675e096e724e18d88}} 
GPRS\+\_\+\+CIPH\+\_\+\+MS2\+SGSN&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GPRS\_CIPH\_SGSN2MS@{GPRS\_CIPH\_SGSN2MS}!gprs\_cipher.h@{gprs\_cipher.h}}\index{gprs\_cipher.h@{gprs\_cipher.h}!GPRS\_CIPH\_SGSN2MS@{GPRS\_CIPH\_SGSN2MS}}}\mbox{\label{gprs__cipher_8h_a3d9c294e932f80539f1ee86ceb5d9b50a854a9a9a9baead2df149718b117622ce}} 
GPRS\+\_\+\+CIPH\+\_\+\+SGSN2\+MS&\\
\hline

\end{DoxyEnumFields}
