libosmogsm 1.13.1.1-afb4 Osmocom GSM library

tuak.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3
4/* low-level functions */
5
6 int tuak_f1(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand,
7 const uint8_t *sqn, const uint8_t *amf, uint8_t *mac_a, uint8_t mac_a_len_bytes,
8 unsigned int keccac_iterations);
9
10 int tuak_f1star(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand,
11 const uint8_t *sqn, const uint8_t *amf, uint8_t *mac_s, uint8_t mac_s_len_bytes,
12 unsigned int keccac_iterations);
13
14 int tuak_f2345(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes,
15 const uint8_t *_rand, uint8_t *res, uint8_t res_len_bytes,
16 uint8_t *ck, uint8_t ck_len_bytes,
17 uint8_t *ik, uint8_t ik_len_bytes, uint8_t *ak, unsigned int keccac_iterations);
18
19 int tuak_f5star(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes,
20 const uint8_t *_rand, uint8_t *ak, unsigned int keccac_iterations);
21
22/* high-level API */
23
24 void tuak_set_keccak_iterations(unsigned int i);
25
26 void tuak_generate(const uint8_t *opc, const uint8_t *amf, const uint8_t *k, uint8_t k_len_bytes,
27 const uint8_t *sqn, const uint8_t *_rand, uint8_t *autn, uint8_t *ik,
28 uint8_t *ck, uint8_t *res, size_t *res_len);
29
30 int tuak_auts(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes,
31 const uint8_t *_rand, const uint8_t *auts, uint8_t *sqn);
32
33 int tuak_opc_gen(uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *op);
tuak_auts
int tuak_auts(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand, const uint8_t *auts, uint8_t *sqn)
tuak_auts - Milenage AUTS validation @opc: OPc = 256-bit operator variant algorithm configuration fie...
Definition: tuak.c:334
tuak_f1
int tuak_f1(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand, const uint8_t *sqn, const uint8_t *amf, uint8_t *mac_a, uint8_t mac_a_len_bytes, unsigned int keccac_iterations)
tuak_f1 - TUAK f1 algorithm @opc: OPc = 256-bit value derived from OP and K @k: K = 128-bit or 256-bi...
Definition: tuak.c:88
tuak_generate
void tuak_generate(const uint8_t *opc, const uint8_t *amf, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *sqn, const uint8_t *_rand, uint8_t *autn, uint8_t *ik, uint8_t *ck, uint8_t *res, size_t *res_len)
tuak_generate - Generate AKA AUTN,IK,CK,RES @opc: OPc = 256-bit operator variant algorithm configurat...
Definition: tuak.c:300
tuak_f2345
int tuak_f2345(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand, uint8_t *res, uint8_t res_len_bytes, uint8_t *ck, uint8_t ck_len_bytes, uint8_t *ik, uint8_t ik_len_bytes, uint8_t *ak, unsigned int keccac_iterations)
tuak_f2345 - TUAK f2, f3, f4, f5, algorithms @opc: OPc = 256-bit value derived from OP and K @k: K = ...
Definition: tuak.c:185
tuak_f5star
int tuak_f5star(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand, uint8_t *ak, unsigned int keccac_iterations)
tuak_f5star - TUAK f5* algorithm @opc: OPc = 256-bit value derived from OP and K @k: K = 128/256-bit ...
Definition: tuak.c:264
tuak_set_keccak_iterations
void tuak_set_keccak_iterations(unsigned int i)
Definition: tuak.c:36
tuak_opc_gen
int tuak_opc_gen(uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *op)
Definition: tuak.c:351
tuak_f1star
int tuak_f1star(const uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *_rand, const uint8_t *sqn, const uint8_t *amf, uint8_t *mac_s, uint8_t mac_s_len_bytes, unsigned int keccac_iterations)
tuak_f1star - TUAK f1* algorithm @opc: OPc = 256-bit value derived from OP and K @k: K = 128-bit or 2...
Definition: tuak.c:136