libosmogsm 1.10.0.58-6cd7a
Osmocom GSM library
|
Kasumi cipher and KGcore functions. More...
Functions | |
static uint16_t | kasumi_FI (uint16_t I, uint16_t skey) |
static uint32_t | kasumi_FO (uint32_t I, const uint16_t *KOi1, const uint16_t *KOi2, const uint16_t *KOi3, const uint16_t *KIi1, const uint16_t *KIi2, const uint16_t *KIi3, unsigned i) |
static uint32_t | kasumi_FL (uint32_t I, const uint16_t *KLi1, const uint16_t *KLi2, unsigned i) |
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_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... | |
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... | |
Kasumi cipher and KGcore 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.
[in] | P | Block, 64 bits to be processed in this round |
[in] | KLi1 | Expanded subkeys |
[in] | KLi2 | Expanded subkeys |
[in] | KOi1 | Expanded subkeys |
[in] | KOi2 | Expanded subkeys |
[in] | KOi3 | Expanded subkeys |
[in] | KIi1 | Expanded subkeys |
[in] | KIi2 | Expanded subkeys |
[in] | KIi3 | Expanded subkeys |
References kasumi_FL(), kasumi_FO(), L, and R.
Referenced by _kasumi_kgcore().
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.
[in] | key | (128 bits) as array of bytes |
[out] | KLi1 | Expanded subkeys |
[out] | KLi2 | Expanded subkeys |
[out] | KOi1 | Expanded subkeys |
[out] | KOi2 | Expanded subkeys |
[out] | KOi3 | Expanded subkeys |
[out] | KIi1 | Expanded subkeys |
[out] | KIi2 | Expanded subkeys |
[out] | KIi3 | Expanded subkeys |
References osmo_rol16().
Referenced by _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)
[in] | CA | |
[in] | cb | |
[in] | cc | |
[in] | cd | |
[in] | ck | 8-bytes long key |
[out] | co | cl-dependent |
[in] | cl |
References _kasumi(), and _kasumi_key_expand().
|
inlinestatic |
Referenced by kasumi_FO().
|
inlinestatic |
References L, osmo_rol16(), and R.
Referenced by _kasumi().
|
inlinestatic |
References kasumi_FI(), L, and R.
Referenced by _kasumi().