libosmogsm 0.9.6-23.20170220git32ee5af8.fc42
Osmocom GSM library
|
Osmocom GSM A5 ciphering algorithm implementation. More...
#include <errno.h>
#include <string.h>
#include <stdbool.h>
#include <osmocom/gsm/a5.h>
#include <osmocom/gsm/kasumi.h>
#include <osmocom/crypt/auth.h>
Functions | |
void | _a5_4 (const uint8_t *ck, uint32_t fn, ubit_t *dl, ubit_t *ul, bool fn_correct) |
Generate a GSM A5/4 cipher stream. | |
void | _a5_3 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul, bool fn_correct) |
Generate a GSM A5/3 cipher stream. | |
static uint32_t | _a5_12_parity (uint32_t x) |
Computes parity of a 32-bit word. | |
static uint32_t | _a5_12_majority (uint32_t v1, uint32_t v2, uint32_t v3) |
Compute majority bit from 3 taps. | |
static uint32_t | _a5_12_clock (uint32_t r, uint32_t mask, uint32_t taps) |
Compute the next LFSR state. | |
static void | _a5_1_clock (uint32_t r[], int force) |
GSM A5/1 Clocking function. | |
static uint8_t | _a5_1_get_output (uint32_t r[]) |
GSM A5/1 Output function. | |
void | _a5_1 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) |
Generate a GSM A5/1 cipher stream. | |
void | osmo_a5_1 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) OSMO_DEPRECATED("Use generic osmo_a5() instead") |
static void | _a5_2_clock (uint32_t r[], int force) |
GSM A5/2 Clocking function. | |
static uint8_t | _a5_2_get_output (uint32_t r[]) |
GSM A5/2 Output function. | |
void | _a5_2 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) |
Generate a GSM A5/1 cipher stream. | |
void | osmo_a5_2 (const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) OSMO_DEPRECATED("Use generic osmo_a5() instead") |
int | osmo_a5 (int n, const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) |
Main method to generate a A5/x cipher stream. | |
Osmocom GSM A5 ciphering algorithm implementation.