libosmogsm 1.9.0.196-9975
Osmocom GSM library
GPRS GEA3/GEA4 ciphering algorithm

Implementation of GPRS Ciphers GEA3 and GEA4. More...

Files

file  gea.h
 GEA3/GEA4 header.
 
file  gea.c
 

Functions

int gea3 (uint8_t *out, uint16_t len, uint8_t *kc, uint32_t iv, enum gprs_cipher_direction direction)
 Performs the GEA3 algorithm as in 3GPP TS 55.216 V6.2.0. More...
 
int gea4 (uint8_t *out, uint16_t len, uint8_t *kc, uint32_t iv, enum gprs_cipher_direction direction)
 Performs the GEA4 algorithm as in 3GPP TS 55.226 V9.0.0. More...
 

Detailed Description

Implementation of GPRS Ciphers GEA3 and GEA4.

Function Documentation

◆ gea3()

int gea3 ( uint8_t *  out,
uint16_t  len,
uint8_t *  kc,
uint32_t  iv,
enum gprs_cipher_direction  direction 
)

Performs the GEA3 algorithm as in 3GPP TS 55.216 V6.2.0.

Parameters
[in,out]outBuffer for gamma for encrypted/decrypted
[in]lenLength of out, in bytes
[in]kcBuffer with the ciphering key
[in]ivInit vector
[in]directDirection: 0 (MS -> SGSN) or 1 (SGSN -> MS)

References gea4(), GPRS_ALGO_GEA4, gprs_cipher_key_length(), len, and osmo_c4().

◆ gea4()

int gea4 ( uint8_t *  out,
uint16_t  len,
uint8_t *  kc,
uint32_t  iv,
enum gprs_cipher_direction  direction 
)

Performs the GEA4 algorithm as in 3GPP TS 55.226 V9.0.0.

Parameters
[in,out]outBuffer for gamma for encrypted/decrypted
[in]lenLength of out, in bytes
[in]kcBuffer with the ciphering key
[in]ivInit vector
[in]directDirection: 0 (MS -> SGSN) or 1 (SGSN -> MS)

References _kasumi_kgcore(), and len.

Referenced by gea3().