blob: 6fb779c69a5fca04d31ff1d902b410368b1071ae [file] [log] [blame]
Harald Welte781bd5d2011-12-06 22:23:52 +01001/*
2 * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
3 * Copyright (c) 2006-2007 <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
Sylvain Munaut12ba7782014-06-16 10:13:40 +020015#pragma once
Harald Welte781bd5d2011-12-06 22:23:52 +010016
17void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
18 const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
19 u8 *ck, u8 *res, size_t *res_len);
20int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
21 u8 *sqn);
22int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres,
23 u8 *kc);
24int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
25 const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len,
26 u8 *auts);
27int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
28 const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s);
29int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
30 u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar);
31
Harald Welte042afe72012-03-21 08:19:47 +010032int milenage_opc_gen(u8 *opc, const u8 *k, const u8 *op);