Change in osmo-msc[master]: Make UTRAN encryption algorithms configurable

dexter gerrit-no-reply at
Mon Apr 19 13:42:37 UTC 2021

dexter has posted comments on this change. ( )

Change subject: Make UTRAN encryption algorithms configurable

Patch Set 1: Code-Review+1


This looks good to me, however I find it a bit difficult to read. On the one hand the code is handling the encryption parameter as a bitbask on the other hand it handles the same encryption parameter as an integer variable with a value from 0-2. 
File src/libmsc/gsm_04_08.c: 
PS1, Line 415: 				is_utran ? net->uea_encryption_mask > 0x01 : net->a5_encryption_mask > 0x01,
This logic > 0x01 is a bit confusion to read. Apparently you are comparing the algorithm number (1-2) here. So if a number from 1-2 is set, then the encryption is present, if the number is 0 then no encryption is active at all. The 0x gives the impression that some bitmask is compared in a wired way. Maybe just writing ... > 1 makes the code more readable. Also a comment might be helpful. 
File src/libmsc/msc_net_init.c: 
PS1, Line 71: 	net->uea_encryption_mask = (1 << 2) | (1 << 1);
Maybe it is better to add some define constants, also together with the greater-then logic in gsm_04_08.c its a bit difficult to understand what is going on.

Is uea_encryption_mask a mask of discrete bits or does it contain the algorithm number?

0 = 00 off
1 = 01 UEA1
2 = 10 UEA2

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I91f9e50f9c1439aa19528f887b83ae9de628fcfd
Gerrit-Change-Number: 22766
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Comment-Date: Mon, 19 Apr 2021 13:42:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list