\doxysection{src/gsm/auth\+\_\+core.c File Reference}
\label{auth__core_8c}\index{src/gsm/auth\_core.c@{src/gsm/auth\_core.c}}
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/plugin.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/crypt/auth.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static \textbf{ LLIST\+\_\+\+HEAD} (osmo\+\_\+auths)
\item 
static int \textbf{ auth\+\_\+data2auth\+\_\+data2} (struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data2} $\ast$out, const struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data} $\ast$in)
\item 
int \textbf{ osmo\+\_\+auth\+\_\+register} (struct \textbf{ osmo\+\_\+auth\+\_\+impl} $\ast$impl)
\begin{DoxyCompactList}\small\item\em Register an authentication algorithm implementation with the core. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+load} (const char $\ast$path)
\begin{DoxyCompactList}\small\item\em Load all available authentication plugins from the given path. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+supported} (enum \textbf{ osmo\+\_\+auth\+\_\+algo} algo)
\begin{DoxyCompactList}\small\item\em Determine if a given authentication algorithm is supported. \end{DoxyCompactList}\item 
static void \textbf{ c5\+\_\+function} (uint8\+\_\+t $\ast$ik, const uint8\+\_\+t $\ast$kc)
\item 
void \textbf{ osmo\+\_\+c4} (uint8\+\_\+t $\ast$ck, const uint8\+\_\+t $\ast$kc)
\item 
int \textbf{ osmo\+\_\+auth\+\_\+3g\+\_\+from\+\_\+2g} (struct \textbf{ osmo\+\_\+auth\+\_\+vector} $\ast$vec)
\begin{DoxyCompactList}\small\item\em Generate 3G CK + IK from 2G authentication vector. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+gen\+\_\+vec2} (struct \textbf{ osmo\+\_\+auth\+\_\+vector} $\ast$vec, struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data2} $\ast$aud, const uint8\+\_\+t $\ast$\+\_\+rand)
\begin{DoxyCompactList}\small\item\em Generate authentication vector. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+gen\+\_\+vec} (struct \textbf{ osmo\+\_\+auth\+\_\+vector} $\ast$vec, struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data} $\ast$aud, const uint8\+\_\+t $\ast$\+\_\+rand)
\begin{DoxyCompactList}\small\item\em Generate authentication vector. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+gen\+\_\+vec\+\_\+auts2} (struct \textbf{ osmo\+\_\+auth\+\_\+vector} $\ast$vec, struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data2} $\ast$aud, const uint8\+\_\+t $\ast$auts, const uint8\+\_\+t $\ast$rand\+\_\+auts, const uint8\+\_\+t $\ast$\+\_\+rand)
\begin{DoxyCompactList}\small\item\em Generate authentication vector and re-\/sync sequence. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+auth\+\_\+gen\+\_\+vec\+\_\+auts} (struct \textbf{ osmo\+\_\+auth\+\_\+vector} $\ast$vec, struct \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+data} $\ast$aud, const uint8\+\_\+t $\ast$auts, const uint8\+\_\+t $\ast$rand\+\_\+auts, const uint8\+\_\+t $\ast$\+\_\+rand)
\begin{DoxyCompactList}\small\item\em Generate authentication vector and re-\/sync sequence. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+auth\+\_\+alg\+\_\+name} (enum \textbf{ osmo\+\_\+auth\+\_\+algo} alg)
\begin{DoxyCompactList}\small\item\em Get human-\/readable name of authentication algorithm. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+auth\+\_\+algo} \textbf{ osmo\+\_\+auth\+\_\+alg\+\_\+parse} (const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Parse human-\/readable name of authentication algorithm. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+auth\+\_\+c3} (uint8\+\_\+t kc[$\,$], const uint8\+\_\+t ck[$\,$], const uint8\+\_\+t ik[$\,$])
\item 
void \textbf{ osmo\+\_\+auth\+\_\+c2} (uint8\+\_\+t \textbf{ sres}[4], const uint8\+\_\+t $\ast$\textbf{ res}, size\+\_\+t res\+\_\+len, uint8\+\_\+t sres\+\_\+deriv\+\_\+func)
\begin{DoxyCompactList}\small\item\em Derive GSM SRES from UMTS [X]RES (auth function c2 from 3GPP TS 33.\+103 Section 6.\+8.\+1.\+2. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static struct \textbf{ osmo\+\_\+auth\+\_\+impl} $\ast$ \textbf{ selected\+\_\+auths} [\textbf{ \+\_\+\+OSMO\+\_\+\+AUTH\+\_\+\+ALG\+\_\+\+NUM}]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ auth\+\_\+alg\+\_\+vals} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+sub\+\_\+auth\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}
