\doxysection{src/gsm/comp128v23.c File Reference}
\label{comp128v23_8c}\index{src/gsm/comp128v23.c@{src/gsm/comp128v23.c}}


COMP128 version 2 and 3 implementation, common algorithm used for GSM Authentication (A3/\+A8).  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \textbf{ \+\_\+comp128v23\+\_\+internal} (uint8\+\_\+t $\ast$output, const uint8\+\_\+t $\ast$kxor, const uint8\+\_\+t $\ast$rand)
\item 
int \textbf{ comp128v3} (const uint8\+\_\+t $\ast$ki, const uint8\+\_\+t $\ast$rand, uint8\+\_\+t $\ast$\textbf{ sres}, uint8\+\_\+t $\ast$kc)
\begin{DoxyCompactList}\small\item\em Perform COMP128v3 algorithm. \end{DoxyCompactList}\item 
int \textbf{ comp128v2} (const uint8\+\_\+t $\ast$ki, const uint8\+\_\+t $\ast$rand, uint8\+\_\+t $\ast$\textbf{ sres}, uint8\+\_\+t $\ast$kc)
\begin{DoxyCompactList}\small\item\em Perform COMP128v2 algorithm. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const uint8\+\_\+t \textbf{ table0} [256]
\item 
static const uint8\+\_\+t \textbf{ table1} [256]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
COMP128 version 2 and 3 implementation, common algorithm used for GSM Authentication (A3/\+A8). 

This code is a C conversion of the original code by Tamas Jos {\texttt{ info@skelsec.\+com}} from\+:
\begin{DoxyItemize}
\item original (out of service)\+: {\texttt{ http\+://www.\+hackingprojects.\+net/}}
\item original (archive)\+: {\texttt{ https\+://web.\+archive.\+org/web/20130730113347/http\+://www.\+hackingprojects.\+net/}}
\item new site\+: {\texttt{ https\+://github.\+com/skelsec/\+COMP128}}
\end{DoxyItemize}