UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
More...
Go to the source code of this file.
|
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. More...
|
|
int | milenage_auts (const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, u8 *sqn) |
| Milenage AUTS validation. More...
|
|
int | gsm_milenage (const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, u8 *kc) |
| Generate GSM-Milenage (3GPP TS 55.205) authentication triplet. More...
|
|
int | milenage_check (const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand, const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len, u8 *auts) |
| Generate AKA AUTN,IK,CK,RES. More...
|
|
int | milenage_f1 (const u8 *opc, const u8 *k, const u8 *_rand, const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s) |
| Milenage f1 and f1* algorithms. More...
|
|
int | milenage_f2345 (const u8 *opc, const u8 *k, const u8 *_rand, u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar) |
| Milenage f2, f3, f4, f5, f5* algorithms. More...
|
|
UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
int 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 |
- Returns
- 0 on success, -1 on failure
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
int milenage_check |
( |
const u8 * |
opc, |
|
|
const u8 * |
k, |
|
|
const u8 * |
sqn, |
|
|
const u8 * |
_rand, |
|
|
const u8 * |
autn, |
|
|
u8 * |
ik, |
|
|
u8 * |
ck, |
|
|
u8 * |
res, |
|
|
size_t * |
res_len, |
|
|
u8 * |
auts |
|
) |
| |
Generate AKA AUTN,IK,CK,RES.
- Parameters
-
opc | OPc = 128-bit operator variant algorithm configuration field (encr.) |
k | K = 128-bit subscriber key |
sqn | SQN = 48-bit sequence number |
_rand | RAND = 128-bit random challenge |
autn | 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 | Variable that will be set to RES length |
auts | 112-bit buffer for AUTS |
- Returns
- 0 on success, -1 on failure, or -2 on synchronization failure
int milenage_f1 |
( |
const u8 * |
opc, |
|
|
const u8 * |
k, |
|
|
const u8 * |
_rand, |
|
|
const u8 * |
sqn, |
|
|
const u8 * |
amf, |
|
|
u8 * |
mac_a, |
|
|
u8 * |
mac_s |
|
) |
| |
Milenage f1 and f1* algorithms.
- Parameters
-
opc | OPc = 128-bit value derived from OP and K |
k | K = 128-bit subscriber key |
_rand | RAND = 128-bit random challenge |
sqn | SQN = 48-bit sequence number |
amf | AMF = 16-bit authentication management field |
mac_a | Buffer for MAC-A = 64-bit network authentication code, or NULL |
mac_s | Buffer for MAC-S = 64-bit resync authentication code, or NULL |
- Returns
- 0 on success, -1 on failure
int milenage_f2345 |
( |
const u8 * |
opc, |
|
|
const u8 * |
k, |
|
|
const u8 * |
_rand, |
|
|
u8 * |
res, |
|
|
u8 * |
ck, |
|
|
u8 * |
ik, |
|
|
u8 * |
ak, |
|
|
u8 * |
akstar |
|
) |
| |
Milenage f2, f3, f4, f5, f5* algorithms.
- Parameters
-
opc | OPc = 128-bit value derived from OP and K |
k | K = 128-bit subscriber key |
_rand | RAND = 128-bit random challenge |
res | Buffer for RES = 64-bit signed response (f2), or NULL |
ck | Buffer for CK = 128-bit confidentiality key (f3), or NULL |
ik | Buffer for IK = 128-bit integrity key (f4), or NULL |
ak | Buffer for AK = 48-bit anonymity key (f5), or NULL |
akstar | Buffer for AK = 48-bit anonymity key (f5*), or NULL |
- Returns
- 0 on success, -1 on failure
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 |