osmo-gmr 0.2.104-2b98
Osmocom GMR-1
|
Osmocom GMR-1 A5 ciphering algorithm implementation. More...
#include <string.h>
#include <stdint.h>
#include <osmocom/core/bits.h>
#include <osmocom/gmr1/l1/a5.h>
Macros | |
#define | A51_R1_LEN 19 |
#define | A51_R2_LEN 22 |
#define | A51_R3_LEN 23 |
#define | A51_R4_LEN 17 |
#define | A51_R1_MASK ((1<<A51_R1_LEN)-1) |
#define | A51_R2_MASK ((1<<A51_R2_LEN)-1) |
#define | A51_R3_MASK ((1<<A51_R3_LEN)-1) |
#define | A51_R4_MASK ((1<<A51_R4_LEN)-1) |
#define | A51_R1_TAPS 0x072000 /* x^19 + x^18 + x^17 + x^14 + 1 */ |
#define | A51_R2_TAPS 0x311000 /* x^22 + x^21 + x^17 + x^13 + 1 */ |
#define | A51_R3_TAPS 0x660000 /* x^23 + x^22 + x^19 + x^18 + 1 */ |
#define | A51_R4_TAPS 0x013100 /* x^17 + x^14 + x^13 + x^9 + 1 */ |
#define | A51_BIT(r, n) (1 << n) |
#define | MAJ(rnum, rname, a, b, c) |
Functions | |
void | gmr1_a5 (int n, uint8_t *key, uint32_t fn, int nbits, ubit_t *dl, ubit_t *ul) |
Main method to generate a A5/x cipher stream. More... | |
void | gmr1_a5_1 (uint8_t *key, uint32_t fn, int nbits, ubit_t *dl, ubit_t *ul) |
Generate a GMR-1 A5/1 cipher stream. More... | |
Osmocom GMR-1 A5 ciphering algorithm implementation.
#define MAJ | ( | rnum, | |
rname, | |||
a, | |||
b, | |||
c | |||
) |