1214501Srpaulo/* 2214501Srpaulo * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) 3214501Srpaulo * Copyright (c) 2006-2007 <j@w1.fi> 4214501Srpaulo * 5214501Srpaulo * This program is free software; you can redistribute it and/or modify 6214501Srpaulo * it under the terms of the GNU General Public License version 2 as 7214501Srpaulo * published by the Free Software Foundation. 8214501Srpaulo * 9214501Srpaulo * Alternatively, this software may be distributed under the terms of BSD 10214501Srpaulo * license. 11214501Srpaulo * 12214501Srpaulo * See README and COPYING for more details. 13214501Srpaulo */ 14214501Srpaulo 15214501Srpaulo#ifndef MILENAGE_H 16214501Srpaulo#define MILENAGE_H 17214501Srpaulo 18214501Srpaulovoid milenage_generate(const u8 *opc, const u8 *amf, const u8 *k, 19214501Srpaulo const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik, 20214501Srpaulo u8 *ck, u8 *res, size_t *res_len); 21214501Srpauloint milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, 22214501Srpaulo u8 *sqn); 23214501Srpauloint gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres, 24214501Srpaulo u8 *kc); 25214501Srpauloint milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand, 26214501Srpaulo const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len, 27214501Srpaulo u8 *auts); 28214501Srpauloint milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand, 29214501Srpaulo const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s); 30214501Srpauloint milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand, 31214501Srpaulo u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar); 32214501Srpaulo 33214501Srpaulo#endif /* MILENAGE_H */ 34