mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-09-13 09:42:43 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4364309ec7 | |||
| b19fbc7a07 | |||
| 9a7d83da3d | |||
| 925573f4d7 | |||
| 9d08268bc4 |
@@ -123,6 +123,8 @@ class BatchPersonalization:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError(f'{p.param_cls.get_name()} fed by {p.src.name}: {e}') from e
|
raise ValueError(f'{p.param_cls.get_name()} fed by {p.src.name}: {e}') from e
|
||||||
|
|
||||||
|
pes.rebuild_mandatory_services()
|
||||||
|
|
||||||
yield pes
|
yield pes
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -873,6 +873,30 @@ class SdKey(BinaryParam):
|
|||||||
|
|
||||||
SdKey.all_implementations = []
|
SdKey.all_implementations = []
|
||||||
|
|
||||||
|
transitional_name_mapping = {
|
||||||
|
'SCP02-KVN20-AES-DEK': 'SCP02-20-AES-DEK',
|
||||||
|
'SCP02-KVN20-AES-ENC': 'SCP02-20-AES-ENC',
|
||||||
|
'SCP02-KVN20-AES-MAC': 'SCP02-20-AES-MAC',
|
||||||
|
'SCP02-KVN21-AES-DEK': 'SCP02-21-AES-DEK',
|
||||||
|
'SCP02-KVN21-AES-ENC': 'SCP02-21-AES-ENC',
|
||||||
|
'SCP02-KVN21-AES-MAC': 'SCP02-21-AES-MAC',
|
||||||
|
'SCP02-KVN22-AES-DEK': 'SCP02-22-AES-DEK',
|
||||||
|
'SCP02-KVN22-AES-ENC': 'SCP02-22-AES-ENC',
|
||||||
|
'SCP02-KVN22-AES-MAC': 'SCP02-22-AES-MAC',
|
||||||
|
'SCP02-KVNff-AES-DEK': 'SCP02-ff-AES-DEK',
|
||||||
|
'SCP02-KVNff-AES-ENC': 'SCP02-ff-AES-ENC',
|
||||||
|
'SCP02-KVNff-AES-MAC': 'SCP02-ff-AES-MAC',
|
||||||
|
'SCP03-KVN30-AES-DEK': 'SCP03-30-AES-DEK',
|
||||||
|
'SCP03-KVN30-AES-ENC': 'SCP03-30-AES-ENC',
|
||||||
|
'SCP03-KVN30-AES-MAC': 'SCP03-30-AES-MAC',
|
||||||
|
'SCP03-KVN31-AES-DEK': 'SCP03-31-AES-DEK',
|
||||||
|
'SCP03-KVN31-AES-ENC': 'SCP03-31-AES-ENC',
|
||||||
|
'SCP03-KVN31-AES-MAC': 'SCP03-31-AES-MAC',
|
||||||
|
'SCP03-KVN32-AES-DEK': 'SCP03-32-AES-DEK',
|
||||||
|
'SCP03-KVN32-AES-ENC': 'SCP03-32-AES-ENC',
|
||||||
|
'SCP03-KVN32-AES-MAC': 'SCP03-32-AES-MAC',
|
||||||
|
}
|
||||||
|
|
||||||
def camel(s):
|
def camel(s):
|
||||||
return s[:1].upper() + s[1:].lower()
|
return s[:1].upper() + s[1:].lower()
|
||||||
|
|
||||||
@@ -904,6 +928,8 @@ class SdKey(BinaryParam):
|
|||||||
|
|
||||||
max_key_len = attrs.get('allow_len')[-1]
|
max_key_len = attrs.get('allow_len')[-1]
|
||||||
|
|
||||||
|
cls_label = transitional_name_mapping.get(cls_label, cls_label)
|
||||||
|
|
||||||
attrs.update({
|
attrs.update({
|
||||||
'name' : cls_label,
|
'name' : cls_label,
|
||||||
'kvn': kvn,
|
'kvn': kvn,
|
||||||
@@ -1156,7 +1182,7 @@ class MilenageRotationConstants(BinaryParam, AlgoConfig):
|
|||||||
|
|
||||||
class MilenageXoringConstants(BinaryParam, AlgoConfig):
|
class MilenageXoringConstants(BinaryParam, AlgoConfig):
|
||||||
"""XOR-ing constants c1,c2,c3,c4,c5 of Milenage, 128bit each. See 3GPP TS 35.206 Sections 2.3 + 5.3.
|
"""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. The default value by 3GPP is the concetenation
|
Provided as octet-string concatenation of all 5 constants. The default value by 3GPP is the concatenation
|
||||||
of::
|
of::
|
||||||
|
|
||||||
00000000000000000000000000000000
|
00000000000000000000000000000000
|
||||||
|
|||||||
+1
-1
@@ -335,7 +335,7 @@ class EF_SUCI_Calc_Info(TransparentEF):
|
|||||||
"""conversion method to generate list of {hnet_pubkey_identifier, hnet_pubkey} dicts
|
"""conversion method to generate list of {hnet_pubkey_identifier, hnet_pubkey} dicts
|
||||||
from flat [{hnet_pubkey_identifier: }, {net_pubkey: }, ...] list"""
|
from flat [{hnet_pubkey_identifier: }, {net_pubkey: }, ...] list"""
|
||||||
out = []
|
out = []
|
||||||
while len(l):
|
while l:
|
||||||
a = l.pop(0)
|
a = l.pop(0)
|
||||||
b = l.pop(0)
|
b = l.pop(0)
|
||||||
z = {**a, **b}
|
z = {**a, **b}
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ class ConfigurableParameterTest(unittest.TestCase):
|
|||||||
upp_fnames = (
|
upp_fnames = (
|
||||||
'TS48v5_SAIP2.1A_NoBERTLV.der',
|
'TS48v5_SAIP2.1A_NoBERTLV.der',
|
||||||
'TS48v5_SAIP2.3_BERTLV_SUCI.der',
|
'TS48v5_SAIP2.3_BERTLV_SUCI.der',
|
||||||
'TS48v5_SAIP2.1B_NoBERTLV.der',
|
|
||||||
'TS48v5_SAIP2.3_NoBERTLV.der',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class Paramtest:
|
class Paramtest:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user