libosmogsm  0.11.0-dirty
Osmocom GSM library
src/gsm/milenage/milenage.h
Go to the documentation of this file.
00001 
00004 /*
00005  * Copyright (c) 2006-2007 <j@w1.fi>
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 2 as
00009  * published by the Free Software Foundation.
00010  *
00011  * Alternatively, this software may be distributed under the terms of BSD
00012  * license.
00013  *
00014  * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause
00015  *
00016  * See README and COPYING for more details.
00017  */
00018 
00019 #pragma once
00020 
00021 void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
00022                        const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
00023                        u8 *ck, u8 *res, size_t *res_len);
00024 int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
00025                   u8 *sqn);
00026 int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres,
00027                  u8 *kc);
00028 int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
00029                    const u8 *autn, u8 *ik, u8 *ck, u8 *res, size_t *res_len,
00030                    u8 *auts);
00031 int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
00032                 const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s);
00033 int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
00034                    u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar);
00035 
00036 int milenage_opc_gen(u8 *opc, const u8 *k, const u8 *op);
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines