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

neels gerrit-no-reply at lists.osmocom.org
Tue Jun 29 20:48:15 UTC 2021


neels has submitted this change. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 64848c5..3fa5fac 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,
@@ -576,7 +575,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: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/1ea93670/attachment.htm>


More information about the gerrit-log mailing list