libosmogsm
0.9.3
Osmocom GSM library
|
00001 /* 00002 * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) 00003 * Copyright (c) 2006-2007 <j@w1.fi> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation. 00008 * 00009 * Alternatively, this software may be distributed under the terms of BSD 00010 * license. 00011 * 00012 * See README and COPYING for more details. 00013 */ 00014 00015 #pragma once 00016 00017 void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k, 00018 const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik, 00019 u8 *ck, u8 *res, size_t *res_len); 00020 int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, 00021 u8 *sqn); 00022 int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, 00023 u8 *kc); 00024 int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand, 00025 const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len, 00026 u8 *auts); 00027 int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand, 00028 const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s); 00029 int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand, 00030 u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar); 00031 00032 int milenage_opc_gen(u8 *opc, const u8 *k, const u8 *op);