msc: generate Milenage ck in f_get_expected_encryption()

Instead of overwriting the ck of the original auth vector, generate the
Milenage-on-GERAN Ck key only for the expected ciphering IEs, centrally
in f_get_expected_encryption().

Related: SYS#5324
Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
This commit is contained in:
Neels Hofmeyr 2021-06-23 23:29:39 +02:00
parent f7831cbcd9
commit f6eff81417
1 changed files with 7 additions and 2 deletions

View File

@ -435,7 +435,6 @@ var GSUP_IE auth_tuple;
g_pars.vec.autn,
g_pars.vec.res));
GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
g_pars.vec.kc := f_auth3g_kc(g_pars.vec);
} else {
g_pars.vec := f_gen_auth_vec_2g();
auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand,
@ -576,7 +575,13 @@ function f_get_expected_encryption(
return;
}
encryptionInformation := tr_BSSMAP_IE_EncrInfo(g_pars.vec.kc, a5_perm_alg);
var OCT8 kc;
if (g_pars.use_umts_aka) {
kc := f_auth3g_kc(g_pars.vec);
} else {
kc := g_pars.vec.kc;
}
encryptionInformation := tr_BSSMAP_IE_EncrInfo(kc, a5_perm_alg);
var OCT1 chosen_alg := int2oct(f_alg_from_mask(f_best_alg_from_mask(a5_perm_alg)) + 1, 1);
chosenEncryptionAlgorithm := tr_BSSMAP_IE_ChosenEncryptionAlgorithm(chosen_alg);