Loading...
Searching...
No Matches
tuak.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
/* low-level functions */
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);
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);
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);
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);
/* high-level API */
void tuak_set_keccak_iterations(unsigned int i);
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);
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);
int tuak_opc_gen(uint8_t *opc, const uint8_t *k, uint8_t k_len_bytes, const uint8_t *op);
res
uint8_t res
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