29 #include <freeradius-devel/util/proto.h>
34 "TS.34.108 Ki and RAND sizes must be identical");
36 #define TS_34_108_XDOUT_SIZE TS_34_108_RAND_SIZE
37 #define TS_34_108_CDOUT_SIZE 8
38 #define TS_34_108_XMAC_SIZE 8
63 for (i = 0; i <
sizeof(xdout); i++) xdout[i] = ki[i] ^ rand[i];
109 for (i = 0; i <
sizeof(xmac); i++) xmac[i] = xdout[i] ^ cdout[i];
116 for (i = 0; i <
sizeof(sqn_buff); i++) p[i] = sqn_buff[i] ^ ak[i];
117 p +=
sizeof(sqn_buff);
#define static_assert
For systems with an old version libc, define static_assert.
Common code used by multiple SIM algorithms.
static uint8_t * uint48_to_buff(uint8_t out[static 6], uint64_t i)
Copy a 48bit value from a 64bit integer into a uint8_t buff in big endian byte order.
#define TS_34_108_CDOUT_SIZE
#define TS_34_108_XDOUT_SIZE
int ts_34_108_umts_generate(uint8_t autn[TS_34_108_AUTN_SIZE], uint8_t ik[TS_34_108_IK_SIZE], uint8_t ck[TS_34_108_CK_SIZE], uint8_t ak[TS_34_108_AK_SIZE], uint8_t res[TS_34_108_RES_SIZE], uint8_t const amf[TS_34_108_AMF_SIZE], uint8_t const ki[TS_34_108_KI_SIZE], uint64_t sqn, uint8_t const rand[TS_34_108_RAND_SIZE])
#define TS_34_108_XMAC_SIZE
Implementation of the TS.34.108 dummy USMI algorithm.
#define TS_34_108_RAND_SIZE
Random challenge.
#define TS_34_108_KI_SIZE
Subscriber key.
#define TS_34_108_CK_SIZE
Ciphering key.
#define TS_34_108_IK_SIZE
Integrity key.
#define TS_34_108_SQN_SIZE
Sequence number.
#define TS_34_108_AK_SIZE
Anonymisation key.
#define TS_34_108_AUTN_SIZE
Network authentication key.
#define TS_34_108_AMF_SIZE
Authentication management field.
#define TS_34_108_RES_SIZE