libosmogsm 1.9.0.196-9975
Osmocom GSM library
kasumi.h File Reference

KASUMI header. More...

#include <stdint.h>

Go to the source code of this file.

Functions

uint64_t _kasumi (uint64_t P, const uint16_t *KLi1, const uint16_t *KLi2, const uint16_t *KOi1, const uint16_t *KOi2, const uint16_t *KOi3, const uint16_t *KIi1, const uint16_t *KIi2, const uint16_t *KIi3)
 Single iteration of KASUMI cipher. More...
 
void _kasumi_kgcore (uint8_t CA, uint8_t cb, uint32_t cc, uint8_t cd, const uint8_t *ck, uint8_t *co, uint16_t cl)
 Implementation of the KGCORE algorithm (used by A5/3, A5/4, GEA3, GEA4 and ECSD) More...
 
void _kasumi_key_expand (const uint8_t *key, uint16_t *KLi1, uint16_t *KLi2, uint16_t *KOi1, uint16_t *KOi2, uint16_t *KOi3, uint16_t *KIi1, uint16_t *KIi2, uint16_t *KIi3)
 Expand key into set of subkeys - see TS 135 202 for details. More...
 

Detailed Description

KASUMI header.

See kasumi.c for details The parameters are described in TS 135 202.

Function Documentation

◆ _kasumi()

uint64_t _kasumi ( uint64_t  P,
const uint16_t *  KLi1,
const uint16_t *  KLi2,
const uint16_t *  KOi1,
const uint16_t *  KOi2,
const uint16_t *  KOi3,
const uint16_t *  KIi1,
const uint16_t *  KIi2,
const uint16_t *  KIi3 
)

Single iteration of KASUMI cipher.

Parameters
[in]PBlock, 64 bits to be processed in this round
[in]KLi1Expanded subkeys
[in]KLi2Expanded subkeys
[in]KOi1Expanded subkeys
[in]KOi2Expanded subkeys
[in]KOi3Expanded subkeys
[in]KIi1Expanded subkeys
[in]KIi2Expanded subkeys
[in]KIi3Expanded subkeys
Returns
processed block of 64 bits

References kasumi_FL(), kasumi_FO(), L, and R.

Referenced by _kasumi_kgcore().

◆ _kasumi_key_expand()

void _kasumi_key_expand ( const uint8_t *  key,
uint16_t *  KLi1,
uint16_t *  KLi2,
uint16_t *  KOi1,
uint16_t *  KOi2,
uint16_t *  KOi3,
uint16_t *  KIi1,
uint16_t *  KIi2,
uint16_t *  KIi3 
)

Expand key into set of subkeys - see TS 135 202 for details.

Parameters
[in]key(128 bits) as array of bytes
[out]KLi1Expanded subkeys
[out]KLi2Expanded subkeys
[out]KOi1Expanded subkeys
[out]KOi2Expanded subkeys
[out]KOi3Expanded subkeys
[out]KIi1Expanded subkeys
[out]KIi2Expanded subkeys
[out]KIi3Expanded subkeys

References osmo_rol16().

Referenced by _kasumi_kgcore().

◆ _kasumi_kgcore()

void _kasumi_kgcore ( uint8_t  CA,
uint8_t  cb,
uint32_t  cc,
uint8_t  cd,
const uint8_t *  ck,
uint8_t *  co,
uint16_t  cl 
)

Implementation of the KGCORE algorithm (used by A5/3, A5/4, GEA3, GEA4 and ECSD)

Parameters
[in]CA
[in]cb
[in]cc
[in]cd
[in]ck8-bytes long key
[out]cocl-dependent
[in]cl

References _kasumi(), and _kasumi_key_expand().

Referenced by _a5_4(), and gea4().