Attention is currently required from: wbokslag.
laforge has posted comments on this change by wbokslag. ( https://gerrit.osmocom.org/c/osmo-tetra/+/41683?usp=email )
Change subject: Added TA61 to the TAA1 suite
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/41683?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I79e93d6863ab6c044a8e19bba85c7447095f5e11
Gerrit-Change-Number: 41683
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:40:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: wbokslag.
laforge has posted comments on this change by wbokslag. ( https://gerrit.osmocom.org/c/osmo-tetra/+/41682?usp=email )
Change subject: Added example keyfile
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/41682?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I7e13dcd10546e118e2cf9845f14121862db0cca9
Gerrit-Change-Number: 41682
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:39:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Hoernchen, tnt, wbokslag.
laforge has posted comments on this change by wbokslag. ( https://gerrit.osmocom.org/c/osmo-tetra/+/41681?usp=email )
Change subject: Fix in GNU Radio 3.10 receiver
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
looks good to me, but I haven't really done much gnuradio in ages.
--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/41681?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I63a95bd8dbbceadd1b6c1b227a125910051d415e
Gerrit-Change-Number: 41681
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:39:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: wbokslag.
laforge has posted comments on this change by wbokslag. ( https://gerrit.osmocom.org/c/osmo-tetra/+/41680?usp=email )
Change subject: Small bugfix in SYSINFO parsing
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/41680?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: Ic35f5106c096a7a3dd0d2302ad53fa00c69ab76d
Gerrit-Change-Number: 41680
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl>
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:38:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41690?usp=email )
Change subject: pySim.esim.saip.personalization: Support Milenage customization
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
for the record: I manually verified that those three parameters work; We still need to think about automatic testing for the esim.saip.personalization in general, not just for those newly-added ones.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41690?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I397df6c0c708a8061e4adc0fde03a3f746bcb5b6
Gerrit-Change-Number: 41690
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:35:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria.
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41672?usp=email )
Change subject: ts_51_011.EF_SMSP: Use integer division during encode
......................................................................
Patch Set 1:
(1 comment)
File pySim/ts_51_011.py:
https://gerrit.osmocom.org/c/pysim/+/41672/comment/cebd305d_ca99722a?usp=em… :
PS1, Line 270: obj/5
> Should this also be fixed?
thanks, amended.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41672?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I989669434c7ddee9595ee81a0822f9966907a844
Gerrit-Change-Number: 41672
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 16 Dec 2025 15:32:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41672?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder
Change subject: ts_51_011.EF_SMSP: Use integer division during encode
......................................................................
ts_51_011.EF_SMSP: Use integer division during encode
Otherwise we might compute float values and fail encoding like this:
> construct.core.FormatFieldError: Error in path (building) -> tp_vp_minutes
> struct '>B' error during building, given value 169.0
Change-Id: I989669434c7ddee9595ee81a0822f9966907a844
---
M pySim/ts_51_011.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/72/41672/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41672?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I989669434c7ddee9595ee81a0822f9966907a844
Gerrit-Change-Number: 41672
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41691?usp=email )
Change subject: esim.saip.data_source: Different source of data for personalization
......................................................................
esim.saip.data_source: Different source of data for personalization
When personalizing eSIM profiles (or even USIM cards), there is often a
need for a data source of fixed / incrementing or random data. This
commit introduces the fundamental infrastructure for this.
Change-Id: Ia6f70ff467ba58024d94742ba5cecd8141b93ad6
---
A pySim/esim/saip/data_source.py
M tests/unittests/test_esim_saip.py
2 files changed, 133 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/91/41691/1
diff --git a/pySim/esim/saip/data_source.py b/pySim/esim/saip/data_source.py
new file mode 100644
index 0000000..0e14ad8
--- /dev/null
+++ b/pySim/esim/saip/data_source.py
@@ -0,0 +1,90 @@
+# Data sources: Provding data for profile personalization
+#
+# (C) 2024 by Harald Welte <laforge(a)osmocom.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import abc
+import secrets
+
+from Cryptodome.Random import get_random_bytes
+
+class DataSource(abc.ABC):
+ """Base class for something that can provide data during a personalization process."""
+
+ @abc.abstractmethod
+ def generate_one(self):
+ pass
+
+
+class DataSourceFixed(DataSource):
+ """A data source that provides a fixed value (of any type).
+
+ Parameters:
+ fixed_value: The fixed value that shall be used during each data generation
+ """
+ def __init__(self, fixed_value, **kwargs):
+ self.fixed_value = fixed_value
+ super().__init__(**kwargs)
+
+ def generate_one(self):
+ return self.fixed_value
+
+
+class DataSourceIncrementing(DataSource):
+ """A data source that provides incrementing integer numbers.
+
+ Parameters:
+ base_value: The start value (value returned during first data generation)
+ step_size: Increment step size (Default: 1)
+ """
+ def __init__(self, base_value: int, **kwargs):
+ self.base_value = int(base_value)
+ self.step_size = kwargs.pop('step_size', 1)
+ self.i = 0
+ super().__init__(**kwargs)
+
+ def generate_one(self):
+ val = self.base_value + self.i
+ self.i += self.step_size
+ return val
+
+
+class DataSourceRandomBytes(DataSource):
+ """A data source that provides a configurable number of random bytes.
+
+ Parameters:
+ size: Number of bytes to generate each turn
+ """
+ def __init__(self, size: int, **kwargs):
+ self.size = size
+ super().__init__(**kwargs)
+
+ def generate_one(self):
+ return get_random_bytes(self.size)
+
+
+class DataSourceRandomUInt(DataSource):
+ """A data source that provides a configurable unsigned integer value.
+
+ Parameters:
+ below: Number one greater than the maximum permitted random unsigned integer
+ """
+ def __init__(self, below: int, **kwargs):
+ self.below = below
+ super().__init__(**kwargs)
+
+ def generate_one(self):
+ return secrets.randbelow(self.below)
+
diff --git a/tests/unittests/test_esim_saip.py b/tests/unittests/test_esim_saip.py
index e7e324d..2796a83 100755
--- a/tests/unittests/test_esim_saip.py
+++ b/tests/unittests/test_esim_saip.py
@@ -21,6 +21,7 @@
from osmocom.utils import h2b, b2h
from pySim.esim.saip import *
+from pySim.esim.saip.data_source import *
from pySim.esim.saip.personalization import *
from pprint import pprint as pp
@@ -90,5 +91,47 @@
self.assertTrue(oid.OID('1.0.1') > oid.OID('1.0'))
self.assertTrue(oid.OID('1.0.2') > oid.OID('1.0.1'))
+class DataSourceTest(unittest.TestCase):
+ def test_fixed(self):
+ FIXED = b'\x01\x02\x03'
+ ds = DataSourceFixed(FIXED)
+ self.assertEqual(ds.generate_one(), FIXED)
+ self.assertEqual(ds.generate_one(), FIXED)
+ self.assertEqual(ds.generate_one(), FIXED)
+
+ def test_incrementing(self):
+ BASE_VALUE = 100
+ ds = DataSourceIncrementing(BASE_VALUE)
+ self.assertEqual(ds.generate_one(), BASE_VALUE)
+ self.assertEqual(ds.generate_one(), BASE_VALUE+1)
+ self.assertEqual(ds.generate_one(), BASE_VALUE+2)
+ self.assertEqual(ds.generate_one(), BASE_VALUE+3)
+
+ def test_incrementing_step3(self):
+ BASE_VALUE = 300
+ ds = DataSourceIncrementing(BASE_VALUE, step_size=3)
+ self.assertEqual(ds.generate_one(), BASE_VALUE)
+ self.assertEqual(ds.generate_one(), BASE_VALUE+3)
+ self.assertEqual(ds.generate_one(), BASE_VALUE+6)
+
+ def test_random(self):
+ ds = DataSourceRandomBytes(8)
+ res = []
+ for i in range(0,100):
+ res.append(ds.generate_one())
+ for r in res:
+ self.assertEqual(len(r), 8)
+ # ensure no duplicates exist
+ self.assertEqual(len(set(res)), len(res))
+
+ def test_random_int(self):
+ ds = DataSourceRandomUInt(below=256)
+ res = []
+ for i in range(0,100):
+ res.append(ds.generate_one())
+ for r in res:
+ self.assertTrue(r < 256)
+
+
if __name__ == "__main__":
unittest.main()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41691?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia6f70ff467ba58024d94742ba5cecd8141b93ad6
Gerrit-Change-Number: 41691
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41690?usp=email )
Change subject: pySim.esim.saip.personalization: Support Milenage customization
......................................................................
pySim.esim.saip.personalization: Support Milenage customization
Milenage offers the capability for operators to modify the r1-r5
rotation constants as well as the c1-c5 xor-ing constants; let's
add ConfigurableParameters for that.
Change-Id: I397df6c0c708a8061e4adc0fde03a3f746bcb5b6
Related: SYS#7787
---
M pySim/esim/saip/personalization.py
1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/90/41690/1
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 053ea0c..068ddba 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -322,3 +322,28 @@
if self.input_value not in [1, 2, 3]:
raise ValueError('Invalid algorithmID %s' % (self.input_value))
self.value = self.input_value
+class MilenageRotationConstants(AlgoConfig, key='rotationConstants'):
+ """rotation constants r1,r2,r3,r4,r5 of Milenage, Range 0..127. See 3GPP TS 35.206 Sections 2.3 + 5.3.
+ Provided as octet-string concatenation of all 5 constants."""
+ def validate(self):
+ super().validate()
+ if len(self.input_value) != 5:
+ raise('Length of value must be 5 octets')
+ for r in self.input_value:
+ if r > 127:
+ raise ValueError('r values must be between 0 and 127')
+class MilenageXoringConstants(AlgoConfig, key='xoringConstants'):
+ """XOR-ing constants c1,c2,c3,c4,c5 of Milenage, 128bit each. See 3GPP TS 35.206 Sections 2.3 + 5.3.
+ Provided as octet-string concatenation of all 5 constants."""
+ def validate(self):
+ if len(self.input_value) != 80:
+ raise('Length of value must be 80 octets')
+ super().validate()
+class TuakNumberOfKeccak(AlgoConfig, key='numberOfKeccak'):
+ """Number of iterations of Keccak-f[1600] permuitation as recomended by Section 7.2 of 3GPP TS 35.231"""
+ def validate(self):
+ if not isinstance(self.input_value, int):
+ raise ValueError('Value must be an integer')
+ if self.input_value < 1 or self.input_value > 255:
+ raise ValueError('Value must be an integer between 1 and 255')
+ self.value = self.input_value
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41690?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I397df6c0c708a8061e4adc0fde03a3f746bcb5b6
Gerrit-Change-Number: 41690
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>