milenage.c File Reference
3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) More...
#include "includes.h"
#include "common.h"
#include "milenage.h"
#include "aes_wrap.h"
Include dependency graph for milenage.c:
Go to the source code of this file.
|
Functions |
void | milenage_generate (const u8 *opc, const u8 *amf, const u8 *k, const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len) |
| Generate AKA AUTN,IK,CK,RES.
|
int | milenage_auts (const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, u8 *sqn) |
| Milenage AUTS validation.
|
void | gsm_milenage (const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, u8 *kc) |
| Generate GSM-Milenage (3GPP TS 55.205) authentication triplet.
|
Detailed Description
3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
- Copyright
- Copyright (c) 2006 <[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 file implements an example authentication algorithm defined for 3GPP AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow EAP-AKA to be tested properly with real USIM cards.
This implementations assumes that the r1..r5 and c1..c5 constants defined in TS 35.206 are used, i.e., r1=64, r2=0, r3=32, r4=64, r5=96, c1=00..00, c2=00..01, c3=00..02, c4=00..04, c5=00..08. The block cipher is assumed to be AES (Rijndael).
Definition in file milenage.c.
Function Documentation
void gsm_milenage |
( |
const u8 * |
opc, |
|
|
const u8 * |
k, |
|
|
const u8 * |
_rand, |
|
|
u8 * |
sres, |
|
|
u8 * |
kc |
|
) |
|
|
|
Generate GSM-Milenage (3GPP TS 55.205) authentication triplet.
- Parameters:
-
| opc | OPc = 128-bit operator variant algorithm configuration field (encr.) |
| k | K = 128-bit subscriber key |
| _rand | RAND = 128-bit random challenge |
| sres | Buffer for SRES = 32-bit SRES |
| kc | Buffer for Kc = 64-bit Kc |
Definition at line 230 of file milenage.c. |
int milenage_auts |
( |
const u8 * |
opc, |
|
|
const u8 * |
k, |
|
|
const u8 * |
_rand, |
|
|
const u8 * |
auts, |
|
|
u8 * |
sqn |
|
) |
|
|
|
Milenage AUTS validation.
- Parameters:
-
| opc | OPc = 128-bit operator variant algorithm configuration field (encr.) |
| k | K = 128-bit subscriber key |
| _rand | RAND = 128-bit random challenge |
| auts | AUTS = 112-bit authentication token from client |
| sqn | Buffer for SQN = 48-bit sequence number |
- Returns:
- 0 = success (sqn filled), -1 on failure
Definition at line 204 of file milenage.c. |
void milenage_generate |
( |
const u8 * |
opc, |
|
|
const u8 * |
amf, |
|
|
const u8 * |
k, |
|
|
const u8 * |
sqn, |
|
|
const u8 * |
_rand, |
|
|
u8 * |
autn, |
|
|
u8 * |
ik, |
|
|
u8 * |
ck, |
|
|
u8 * |
res, |
|
|
size_t * |
res_len |
|
) |
|
|
|
Generate AKA AUTN,IK,CK,RES.
- Parameters:
-
| opc | OPc = 128-bit operator variant algorithm configuration field (encr.) |
| amf | AMF = 16-bit authentication management field |
| k | K = 128-bit subscriber key |
| sqn | SQN = 48-bit sequence number |
| _rand | RAND = 128-bit random challenge |
| autn | Buffer for AUTN = 128-bit authentication token |
| ik | Buffer for IK = 128-bit integrity key (f4), or NULL |
| ck | Buffer for CK = 128-bit confidentiality key (f3), or NULL |
| res | Buffer for RES = 64-bit signed response (f2), or NULL |
| res_len | Max length for res; set to used length or 0 on failure |
Definition at line 171 of file milenage.c. |
Generated on Sun Dec 31 13:45:22 2006 for hostapd by
1.4.2