summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-04-21 17:12:40 +0200
committerHarald Welte <laforge@gnumonks.org>2016-04-22 15:10:55 +0200
commit1f9d8183be276fa770b106d1e8f9719386a9515a (patch)
tree4d845b5c1d6ace7c3b65269917d53bfa0ecdfce9 /src
parentfdb3d8ce7898801d5b18d446a17ccc0f09451d4f (diff)
Deprecate comp128
Mark function as deprecated to discourage its usage: people should use generic API in osmocom/crypt/auth.h
Diffstat (limited to 'src')
-rw-r--r--src/gsm/auth_comp128v1.c2
-rw-r--r--src/gsm/comp128.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c
index 41aef71c..c40027ee 100644
--- a/src/gsm/auth_comp128v1.c
+++ b/src/gsm/auth_comp128v1.c
@@ -28,7 +28,7 @@ static int c128v1_gen_vec(struct osmo_auth_vector *vec,
struct osmo_sub_auth_data *aud,
const uint8_t *_rand)
{
- comp128(aud->u.gsm.ki, _rand, vec->sres, vec->kc);
+ comp128v1(aud->u.gsm.ki, _rand, vec->sres, vec->kc);
vec->auth_types = OSMO_AUTH_TYPE_GSM;
return 0;
diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c
index b7a23820..abb49179 100644
--- a/src/gsm/comp128.c
+++ b/src/gsm/comp128.c
@@ -185,7 +185,7 @@ _comp128_permutation(uint8_t *x, uint8_t *bits)
}
void
-comp128(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc)
+comp128v1(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc)
{
int i;
uint8_t x[32], bits[128];
@@ -228,3 +228,8 @@ comp128(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc)
kc[7] = 0;
}
+void
+comp128(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc)
+{
+ comp128v1(ki, rand, sres, kc);
+}