diff options
author | Max <msuraev@sysmocom.de> | 2016-06-30 10:39:00 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-07-11 19:15:24 +0000 |
commit | 4f169500df996d0a7a804da77bae07b2ecd0d813 (patch) | |
tree | a7904447e291f1782837d03e4702543541d10b30 /include/osmocom | |
parent | 02a66728856d6a111ef61eca2cc052df052579a9 (diff) |
Add GEA3 & GEA4 ciphers
Corresponding test code include both official test vectors from the
specs and data from over-the-air tests.
This obsoletes libosmo-crypt-a53 as it was last missing piece
unimplemented in libosmogsm.
Change-Id: I939e4f6b91b4a7c591ef3761fe2d46ed1c2fb2d3
Related: OS#1582
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/crypt/gprs_cipher.h | 2 | ||||
-rw-r--r-- | include/osmocom/gsm/gea.h | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/osmocom/crypt/gprs_cipher.h b/include/osmocom/crypt/gprs_cipher.h index d2425955..c302f10b 100644 --- a/include/osmocom/crypt/gprs_cipher.h +++ b/include/osmocom/crypt/gprs_cipher.h @@ -3,6 +3,8 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/utils.h> +#include <stdint.h> + #define GSM0464_CIPH_MAX_BLOCK 1523 /* 3GPP TS 24.008 ยง 10.5.5.3 */ diff --git a/include/osmocom/gsm/gea.h b/include/osmocom/gsm/gea.h new file mode 100644 index 00000000..3051101d --- /dev/null +++ b/include/osmocom/gsm/gea.h @@ -0,0 +1,17 @@ +/* + * GEA3 header + * + * See gea.c for details + */ + +#pragma once + +#include <osmocom/crypt/gprs_cipher.h> + +#include <stdint.h> + +int gea3(uint8_t *out, uint16_t len, uint8_t *kc, uint32_t iv, + enum gprs_cipher_direction direct); + +int gea4(uint8_t *out, uint16_t len, uint8_t *kc, uint32_t iv, + enum gprs_cipher_direction direct); |