HP-UX AAA Server A.08.02.10 Administrator's Guide HP-UX 11i v3 (T1428-90093, November 2013)
an individual GSM network operator. Therefore, the functions are not standardized. Instead, each
operator specifies the functions. The A3 and A8 algorithm plug-ins are software modules that
contain these specific functions. They customize the GSM authentication for each network operator.
An A3 or A8 plug-in may include zero or one A3 algorithm. If you write a plug-in for A3, an A8
plug-in with the same name must exist. Similarly, if you write a plug-in for A8, an A3 plug-in with
the same name must exist.
Creating A3, A8 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 sample_sim_a3a8.c file to create a plug-in.
To create a plug-in using the sample_sim_a3a8.c file, which is available at /opt/aaa/
examples/sdk/sim_a3a8, complete the following steps:
1. Rename the sample_sim_a3a8.c file and open it for editing.
2. Add any header file specific to your module along with 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 (a3impl and a8impl) function names in the following prototype, if required:
static int a3impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * sres );
static int a8impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * kc );
NOTE: Changing the function names is not mandatory. However, the parameters must not
be modified.
4. Register the A3 and A8 algorithm plug-ins.
1. To modify the number of plug-ins, change the array size of plugin_array[1] to the
number of plug-ins to be written for this module.
2. Modify the plugin_load function in the following code:
sim_a3a8_plugin_info_t * sim_a3a8_info;
static const char func[] = "plugin_load";
a. Set the name of the plug-in in the following code to the required name:
sim_a3a8_info->name = "sample_sim_a3a8";
b. Set the description of the plug-in in the following code:
sim_a3a8_info->info = "Sample EAP-SIM A3/A8 algorithm plugin";
c. If the (a3impl and a8impl) function names are modified, make the corresponding
changes in the following code:
sim_a3a8_info->a3 = a3impl;
sim_a3a8_info->a8 = a8impl;
d. Enter the value of plugin_array as described in the code. For example, for the
second plug-in, modify the code as follows:
plugin_array[0].type = SIM_A3A8;
plugin_array[0].info = (void *)sim_a3a8_info;
e. If there is more than one plug-in, modify the value accordingly in the following code:
*plugin_count = 1;
336 Customizing the HP-UX AAA Server Using the SDK