hlr_auc_gw.c File Reference

HLR/AuC testing gateway for hostapd EAP-SIM/AKA database/authenticator. More...

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include "common.h"
#include "milenage.h"

Include dependency graph for hlr_auc_gw.c:

Go to the source code of this file.

Defines

#define EAP_SIM_MAX_CHAL   3
#define EAP_AKA_RAND_LEN   16
#define EAP_AKA_AUTN_LEN   16
#define EAP_AKA_AUTS_LEN   14
#define EAP_AKA_RES_MAX_LEN   16
#define EAP_AKA_IK_LEN   16
#define EAP_AKA_CK_LEN   16

Functions

int main (int argc, char *argv[])


Detailed Description

HLR/AuC testing gateway for hostapd EAP-SIM/AKA database/authenticator.

Copyright
Copyright (c) 2005-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

This is an example implementation of the EAP-SIM/AKA database/authentication gateway interface to HLR/AuC. It is expected to be replaced with an implementation of SS7 gateway to GSM/UMTS authentication center (HLR/AuC) or a local implementation of SIM triplet and AKA authentication data generator.

hostapd will send SIM/AKA authentication queries over a UNIX domain socket to and external program, e.g., this hlr_auc_gw. This interface uses simple text-based format:

EAP-SIM / GSM triplet query/response: SIM-REQ-AUTH <imsi> <max_chal> SIM-RESP-AUTH <imsi> Kc1:SRES1:RAND1 Kc2:SRES2:RAND2 [Kc3:SRES3:RAND3] SIM-RESP-AUTH <imsi> FAILURE

EAP-AKA / UMTS query/response: AKA-REQ-AUTH <imsi> AKA-RESP-AUTH <imsi> <rand> <autn> <ik> <ck> <res> AKA-RESP-AUTH <imsi> FAILURE

EAP-AKA / UMTS AUTS (re-synchronization): AKA-AUTS <imsi> <auts> <rand>

IMSI and max_chal are sent as an ASCII string, Kc/SRES/RAND/AUTN/IK/CK/RES/AUTS as hex strings.

The example implementation here reads GSM authentication triplets from a text file in IMSI:Kc:SRES:RAND format, IMSI in ASCII, other fields as hex strings. This is used to simulate an HLR/AuC. As such, it is not very useful for real life authentication, but it is useful both as an example implementation and for EAP-SIM testing.

Definition in file hlr_auc_gw.c.


Generated on Sun Dec 31 13:44:54 2006 for hostapd by  doxygen 1.4.2