GNU Radio's GSM Package
GSM/GPRS/3G Authentication

Files

file  auth.h
 

Classes

struct  osmo_sub_auth_data
 
struct  osmo_auth_vector
 
struct  osmo_auth_impl
 

Macros

#define OSMO_A5_MAX_KEY_LEN_BYTES   (128/8)
 
#define OSMO_MILENAGE_IND_BITLEN_MAX   28
 

Enumerations

enum  osmo_sub_auth_type { OSMO_AUTH_TYPE_NONE = 0x00, OSMO_AUTH_TYPE_GSM = 0x01, OSMO_AUTH_TYPE_UMTS = 0x02 }
 
enum  osmo_auth_algo {
  OSMO_AUTH_ALG_NONE, OSMO_AUTH_ALG_COMP128v1, OSMO_AUTH_ALG_COMP128v2, OSMO_AUTH_ALG_COMP128v3,
  OSMO_AUTH_ALG_XOR, OSMO_AUTH_ALG_MILENAGE, _OSMO_AUTH_ALG_NUM
}
 

Functions

int osmo_auth_gen_vec (struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *_rand)
 
int osmo_auth_gen_vec_auts (struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *auts, const uint8_t *rand_auts, const uint8_t *_rand)
 
int osmo_auth_register (struct osmo_auth_impl *impl)
 
int osmo_auth_load (const char *path)
 
int osmo_auth_supported (enum osmo_auth_algo algo)
 
void osmo_c4 (uint8_t *ck, const uint8_t *kc)
 
const char * osmo_auth_alg_name (enum osmo_auth_algo alg)
 
void osmo_auth_c3 (uint8_t kc[], const uint8_t ck[], const uint8_t ik[])
 

Variables

const struct value_string osmo_sub_auth_type_names []
 
enum osmo_sub_auth_type osmo_sub_auth_data::type
 
enum osmo_auth_algo osmo_sub_auth_data::algo
 
uint8_t   osmo_sub_auth_data::opc [16]
 
uint8_t   osmo_sub_auth_data::k [16]
 
uint8_t   osmo_sub_auth_data::amf [2]
 
uint64_t   osmo_sub_auth_data::sqn
 
int   osmo_sub_auth_data::opc_is_op
 
unsigned int   osmo_sub_auth_data::ind_bitlen
 
unsigned int   osmo_sub_auth_data::ind
 
uint64_t   osmo_sub_auth_data::sqn_ms
 
struct {
   uint8_t   osmo_sub_auth_data::opc [16]
 
   uint8_t   osmo_sub_auth_data::k [16]
 
   uint8_t   osmo_sub_auth_data::amf [2]
 
   uint64_t   osmo_sub_auth_data::sqn
 
   int   osmo_sub_auth_data::opc_is_op
 
   unsigned int   osmo_sub_auth_data::ind_bitlen
 
   unsigned int   osmo_sub_auth_data::ind
 
   uint64_t   osmo_sub_auth_data::sqn_ms
 
}   osmo_sub_auth_data::umts
 
uint8_t   osmo_sub_auth_data::ki [OSMO_A5_MAX_KEY_LEN_BYTES]
 
struct {
   uint8_t   osmo_sub_auth_data::ki [OSMO_A5_MAX_KEY_LEN_BYTES]
 
}   osmo_sub_auth_data::gsm
 
union {
   struct {
      uint8_t   osmo_sub_auth_data::opc [16]
 
      uint8_t   osmo_sub_auth_data::k [16]
 
      uint8_t   osmo_sub_auth_data::amf [2]
 
      uint64_t   osmo_sub_auth_data::sqn
 
      int   osmo_sub_auth_data::opc_is_op
 
      unsigned int   osmo_sub_auth_data::ind_bitlen
 
      unsigned int   osmo_sub_auth_data::ind
 
      uint64_t   osmo_sub_auth_data::sqn_ms
 
   }   osmo_sub_auth_data::umts
 
   struct {
      uint8_t   osmo_sub_auth_data::ki [OSMO_A5_MAX_KEY_LEN_BYTES]
 
   }   osmo_sub_auth_data::gsm
 
osmo_sub_auth_data::u
 
uint8_t osmo_auth_vector::rand [16]
 
uint8_t osmo_auth_vector::autn [16]
 
uint8_t osmo_auth_vector::ck [16]
 
uint8_t osmo_auth_vector::ik [16]
 
uint8_t osmo_auth_vector::res [16]
 
uint8_t osmo_auth_vector::res_len
 
uint8_t osmo_auth_vector::kc [8]
 
uint8_t osmo_auth_vector::sres [4]
 
uint32_t osmo_auth_vector::auth_types
 
struct llist_head osmo_auth_impl::list
 
enum osmo_auth_algo osmo_auth_impl::algo
 
const char * osmo_auth_impl::name
 
unsigned int osmo_auth_impl::priority
 
int(* osmo_auth_impl::gen_vec )(struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *_rand)
 
int(* osmo_auth_impl::gen_vec_auts )(struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *auts, const uint8_t *rand_auts, const uint8_t *_rand)
 

Detailed Description

Macro Definition Documentation

◆ OSMO_A5_MAX_KEY_LEN_BYTES

#define OSMO_A5_MAX_KEY_LEN_BYTES   (128/8)

◆ OSMO_MILENAGE_IND_BITLEN_MAX

#define OSMO_MILENAGE_IND_BITLEN_MAX   28

Enumeration Type Documentation

◆ osmo_auth_algo

Authentication Algorithm. See also osmo_auth_alg_name() and osmo_auth_alg_parse().

Enumerator
OSMO_AUTH_ALG_NONE 
OSMO_AUTH_ALG_COMP128v1 
OSMO_AUTH_ALG_COMP128v2 
OSMO_AUTH_ALG_COMP128v3 
OSMO_AUTH_ALG_XOR 
OSMO_AUTH_ALG_MILENAGE 
_OSMO_AUTH_ALG_NUM 

◆ osmo_sub_auth_type

Authentication Type (GSM/UMTS)

Enumerator
OSMO_AUTH_TYPE_NONE 
OSMO_AUTH_TYPE_GSM 
OSMO_AUTH_TYPE_UMTS 

Function Documentation

◆ osmo_auth_alg_name()

const char* osmo_auth_alg_name ( enum osmo_auth_algo  alg)

◆ osmo_auth_c3()

void osmo_auth_c3 ( uint8_t  kc[],
const uint8_t  ck[],
const uint8_t  ik[] 
)

◆ osmo_auth_gen_vec()

int osmo_auth_gen_vec ( struct osmo_auth_vector vec,
struct osmo_sub_auth_data aud,
const uint8_t *  _rand 
)

◆ osmo_auth_gen_vec_auts()

int osmo_auth_gen_vec_auts ( struct osmo_auth_vector vec,
struct osmo_sub_auth_data aud,
const uint8_t *  auts,
const uint8_t *  rand_auts,
const uint8_t *  _rand 
)

◆ osmo_auth_load()

int osmo_auth_load ( const char *  path)

◆ osmo_auth_register()

int osmo_auth_register ( struct osmo_auth_impl impl)

◆ osmo_auth_supported()

int osmo_auth_supported ( enum osmo_auth_algo  algo)

◆ osmo_c4()

void osmo_c4 ( uint8_t *  ck,
const uint8_t *  kc 
)

Variable Documentation

◆ algo [1/2]

enum osmo_auth_algo osmo_auth_impl::algo

algorithm we implement

◆ algo [2/2]

enum osmo_auth_algo osmo_sub_auth_data::algo

◆ amf [1/2]

uint8_t osmo_sub_auth_data::amf[2]

◆ amf [2/2]

uint8_t { ... } ::amf[2]

◆ auth_types

uint32_t osmo_auth_vector::auth_types

bitmask of OSMO_AUTH_TYPE_*

◆ autn

uint8_t osmo_auth_vector::autn[16]

authentication nonce

◆ ck

uint8_t osmo_auth_vector::ck[16]

ciphering key

◆ gen_vec

int(* osmo_auth_impl::gen_vec) (struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *_rand)

callback for generate authentication vectors

◆ gen_vec_auts

int(* osmo_auth_impl::gen_vec_auts) (struct osmo_auth_vector *vec, struct osmo_sub_auth_data *aud, const uint8_t *auts, const uint8_t *rand_auts, const uint8_t *_rand)

◆ gsm [1/2]

struct { ... } ::gsm

◆ gsm [2/2]

struct { ... } osmo_sub_auth_data::gsm

◆ ik

uint8_t osmo_auth_vector::ik[16]

integrity key

◆ ind [1/2]

unsigned int osmo_sub_auth_data::ind

which IND slot to use an SQN from

◆ ind [2/2]

unsigned { ... } ::ind

which IND slot to use an SQN from

◆ ind_bitlen [1/2]

unsigned int osmo_sub_auth_data::ind_bitlen

nr of bits not in SEQ, only SQN

◆ ind_bitlen [2/2]

unsigned { ... } ::ind_bitlen

nr of bits not in SEQ, only SQN

◆ k [1/2]

uint8_t { ... } ::k[16]

secret key of the subscriber

◆ k [2/2]

uint8_t osmo_sub_auth_data::k[16]

secret key of the subscriber

◆ kc

uint8_t osmo_auth_vector::kc[8]

Kc for GSM encryption (A5)

◆ ki [1/2]

uint8_t osmo_sub_auth_data::ki[OSMO_A5_MAX_KEY_LEN_BYTES]

secret key

◆ ki [2/2]

uint8_t { ... } ::ki[OSMO_A5_MAX_KEY_LEN_BYTES]

secret key

◆ list

struct llist_head osmo_auth_impl::list

◆ name

const char* osmo_auth_impl::name

name of the implementation

◆ opc [1/2]

uint8_t osmo_sub_auth_data::opc[16]

operator invariant value

◆ opc [2/2]

uint8_t { ... } ::opc[16]

operator invariant value

◆ opc_is_op [1/2]

int osmo_sub_auth_data::opc_is_op

is the OPC field OPC (0) or OP (1) ?

◆ opc_is_op [2/2]

int { ... } ::opc_is_op

is the OPC field OPC (0) or OP (1) ?

◆ osmo_sub_auth_type_names

const struct value_string osmo_sub_auth_type_names[]
extern

◆ priority

unsigned int osmo_auth_impl::priority

priority value (resp. othe implementations

◆ rand

uint8_t osmo_auth_vector::rand[16]

random challenge

◆ res

uint8_t osmo_auth_vector::res[16]

authentication result

◆ res_len

uint8_t osmo_auth_vector::res_len

length (in bytes) of res

◆ sqn [1/2]

uint64_t { ... } ::sqn

sequence number (in: prev sqn; out: used sqn)

◆ sqn [2/2]

uint64_t osmo_sub_auth_data::sqn

sequence number (in: prev sqn; out: used sqn)

◆ sqn_ms [1/2]

uint64_t { ... } ::sqn_ms

sqn from AUTS (output value only)

◆ sqn_ms [2/2]

uint64_t osmo_sub_auth_data::sqn_ms

sqn from AUTS (output value only)

◆ sres

uint8_t osmo_auth_vector::sres[4]

authentication result for GSM

◆ type

enum osmo_sub_auth_type osmo_sub_auth_data::type

◆ u

union { ... } osmo_sub_auth_data::u

◆ umts [1/2]

struct { ... } ::umts

◆ umts [2/2]

struct { ... } osmo_sub_auth_data::umts