Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37839?usp=email )
Change subject: pySim-shell: prevent opening/closing logical channel 0
......................................................................
Patch Set 7: Code-Review+1
(1 comment)
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/37839/comment/4cd0fa48_d493a729?usp=em… :
PS4, Line 968: choices=range(1,4),
> Yes, range(1,4) excludes the 4 (i find that a bit confusing, bit it seems to be some half open inter […]
sysmocom cards only support basic logical channels, while pySim contains (untested) support for extended logical channels. The ATR tells us about the support:
```
ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 51 CC
...
Command chaining, length fields and logical channels: 1B
- Logical channel number assignment: by the interface device and card
- Maximum number of logical channels: 4
```
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37839?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: I4eebd9f15fadd18e1caeb033fda36c59446fcab8
Gerrit-Change-Number: 37839
Gerrit-PatchSet: 7
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:15:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37917?usp=email )
Change subject: filesystem: add command to delete all contents from a BER-TLV EF
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37917?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: I5d6bcfe865df7cb8fa6dd0052cab3b364d929f94
Gerrit-Change-Number: 37917
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:11:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/simtrace2/+/37934?usp=email )
Change subject: README.md: Add note to avoid using a VM
......................................................................
README.md: Add note to avoid using a VM
Change-Id: I59602e6a05600fa3e100e17c10e48977391361e3
---
M README.md
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/34/37934/2
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/37934?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I59602e6a05600fa3e100e17c10e48977391361e3
Gerrit-Change-Number: 37934
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/37934?usp=email )
Change subject: README.md: Add note to avoid using a VM
......................................................................
README.md: Add note to avoid using a VM
Change-Id: I59602e6a05600fa3e100e17c10e48977391361e3
---
M README.md
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/34/37934/1
diff --git a/README.md b/README.md
index d24effc..81948f9 100644
--- a/README.md
+++ b/README.md
@@ -41,3 +41,14 @@
* simtrace2-list - list any USB-attached devices running simtrace2 firmware
* simtrace2-sniff - interface the 'trace' firmware to obtain card protocol traces
* simtrace2-cardem-pcsc - interface the 'cardem' fimrware to use a SIM in a PC/SC reader
+
+
+Do not expect SIMtrace2 to work in VMs
+--------------------------------------
+
+We only support running SIMtrace2 together with a Linux system running
+"bare iron" on actual hardware (x86, x86_64, arm, ...). **using VMs
+with USB pass-through for things with critical timing like SIMtrace2 is
+calling for trouble** and we will not accept related bug reports or
+support you if you do. If you still want ot use VMs: Feel free to do
+so, but understand that it's unsupported and you are on your own.
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/37934?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I59602e6a05600fa3e100e17c10e48977391361e3
Gerrit-Change-Number: 37934
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37930?usp=email )
Change subject: pySim-shell: fix sourcecode formatting
......................................................................
pySim-shell: fix sourcecode formatting
Change-Id: I7133e93366eaacca5ace301172a08ae84e211c0e
---
M pySim-shell.py
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
dexter: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim-shell.py b/pySim-shell.py
index 78d20e6..d166008 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -1084,8 +1084,7 @@
traceback.print_exc()
print("---------------------8<---------------------")
print("(you may still try to recover from this manually by using the 'equip' command.)")
- print(
- " it should also be noted that some readers may behave strangely when no card")
+ print(" it should also be noted that some readers may behave strangely when no card")
print(" is inserted.)")
print("")
if opts.script:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37930?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I7133e93366eaacca5ace301172a08ae84e211c0e
Gerrit-Change-Number: 37930
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37931?usp=email )
Change subject: scp: fix key length in dek_encrypt and dek_decrypt
......................................................................
scp: fix key length in dek_encrypt and dek_decrypt
When creating the DES cipher object with DES.new, we use the property
card_keys.dek. This property may hold a 16 byte key, but DES uses
an 8 byte key. Pycryptodome does not automatically ignore excess key
bytes. Instead it throws an exception. This means we need to make sure
to supply only the first 8 bytes of card_keys.dek
Related: OS#6531
Change-Id: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f
---
M pySim/global_platform/scp.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/37931/1
diff --git a/pySim/global_platform/scp.py b/pySim/global_platform/scp.py
index f68bcf9..17463ff 100644
--- a/pySim/global_platform/scp.py
+++ b/pySim/global_platform/scp.py
@@ -230,11 +230,11 @@
super().__init__(*args, **kwargs)
def dek_encrypt(self, plaintext:bytes) -> bytes:
- cipher = DES.new(self.card_keys.dek, DES.MODE_ECB)
+ cipher = DES.new(self.card_keys.dek[:8], DES.MODE_ECB)
return cipher.encrypt(plaintext)
def dek_decrypt(self, ciphertext:bytes) -> bytes:
- cipher = DES.new(self.card_keys.dek, DES.MODE_ECB)
+ cipher = DES.new(self.card_keys.dek[:8], DES.MODE_ECB)
return cipher.decrypt(ciphertext)
def _compute_cryptograms(self, card_challenge: bytes, host_challenge: bytes):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37931?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: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f
Gerrit-Change-Number: 37931
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>