diff options
author | Harald Welte <laforge@osmocom.org> | 2023-05-30 15:57:08 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-06-02 08:29:55 +0000 |
commit | 76f4c5cf5ca769b2913521965410599387c8acd9 (patch) | |
tree | fa6dfc4b22f65d92647f66a0865546ff3b3ed408 /include/osmocom | |
parent | d8e530952719fafe8aa512df085f3f568fde5cf2 (diff) |
libosmogsm: Factor out the C2 derivation function
3GPP specifies the C2 derivation function (generating GSM SRES from UMTS XRES)
independent of the MILENAGE algorithm. So instead of open-coding it in
milenage.c:gsm_milenage(), let's create a separate public function
osmo_auth_c2() similar to the already-existing osmo_auth_c3() function.
gsm_milenage() can then simply use that function.
Change-Id: I0e7cd55f5578f891cb6cc1b0442920ba5beddae4
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/crypt/auth.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index dfec885b..0e9b502e 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -144,5 +144,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); +void osmo_auth_c2(uint8_t sres[4], const uint8_t *res, size_t res_len, uint8_t sres_deriv_func); /* @} */ |