HP-UX AAA Server A.08.02.10 Administrator's Guide HP-UX 11i v3 (T1428-90093, November 2013)
5. To implement the sample A3 algorithm, modify the following code:
unsigned int idx;
for ( idx = 0; idx < 4; ++idx )
{
sres[idx] = 0;
}
return SDK_SUCCESS;
On success, A3 Algorithm returns sdk_success. Otherwise, it returns sdk_failure.
6. To implement the sample A8 algorithm, modify the following code:
unsigned int idx;
for ( idx = 0; idx < 8; ++idx )
{
kc[idx] = 0;
}
return SDK_SUCCESS;
On success, A3 Algorithm returns sdk_success. Otherwise, it returns sdk_failure.
AKA Algorithm Plug-in for EAP-AKA
The GSM AKA algorithms are used in EAP-AKA. The content of the AKA 3GPP algorithm plug-ins
is specific to the EAP-AKA protocol requirements. [GSM-03.20] specifies the general GSM
authentication procedure and the external interface of the f1, f1x, f2, f3, f4, f5 and f5x functions.
The operations of these functions are associated with the domain of an individual GSM network
operator. Therefore, the functions are not standardized. Instead, each operator specifies the
functions. AKA algorithm plug-ins are software modules that contain these specific functions. They
customize the GSM authentication for each network operator.
Creating AKA Plug-ins
You can create a plug-in using one of the sample plug-ins as a base. The procedure and the
example described in this section use the checkCSI.c file to create a plug-in.
To create a plug-in using the sample_aka_algo.c file, which is available at /opt/aaa/
examples/sdk/aka_algo, complete the following steps:
1. Rename the sample_aka_algo.c file and open it for editing.
2. Include the following mandatory header files:
#include "sdk.h"
#include "plugin.h"
#include <syslog.h>
You can also add other header files that you require.
3. Change the (f1impl, f1ximpl, f2impl, f3impl, f4impl, f5impl and f5ximpl)
function names in the following prototypes, if required:
static int f1impl( const unsigned char * ki,
const unsigned char * rand,
const unsigned char * sqn,
const unsigned char * amf,
unsigned char * maca );
static int f1ximpl( const unsigned char * ki,
const unsigned char * rand,
const unsigned char * sqn,
const unsigned char * amf,
unsigned char * macs );
static int f2impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * res );
Creating Plug-ins for AATVs 337