Change in osmo-ttcn3-hacks[master]: msc: generate Milenage ck in f_get_expected_encryption()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Wed Jun 23 21:53:49 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24759 )


Change subject: msc: generate Milenage ck in f_get_expected_encryption()
......................................................................

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
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 7 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/24759/1

diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index be72399..68a370d 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -435,7 +435,6 @@
 								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,
@@ -577,7 +576,13 @@
 		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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24759
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
Gerrit-Change-Number: 24759
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210623/b4360bf5/attachment.htm>


More information about the gerrit-log mailing list