libosmogsm 1.13.1.1-afb4 Osmocom GSM library

Functions
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] | 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

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] | 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().

## ◆ _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] | ck | 8-bytes long key
  [out] | co | cl-dependent
  [in] | cl |

References _kasumi(), and _kasumi_key_expand().

Referenced by _a5_4(), and gea4().