Attention is currently required from: laforge, pespin, dexter. Christian Amsüss has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/29033 )
Change subject: Add new pySim.ota library, implement SIM OTA crypto ......................................................................
Patch Set 7:
(1 comment)
Patchset:
PS7:
so somewhere in the changes from 5 -> 7 we have a regression in the command encoding. […]
That's not a regression, that's part of the fix. The plaintext going into this used to have PCNT=0 and a few trailing bytes, now it has the correct PCNT for the trailing bytes, changing all the ciphertext from that point.
I'm not sure where the expected-good value in the assert came from, but if it came from external then that external source had the same bug, and if it was generated by this code and checked against an known card implementation, then that just happened to pass because in most situations the lack of padding indication doesn't break command execution.