Commit Graph

9 Commits

Author SHA1 Message Date
Vadim Yanitskiy f6a806494c shadysim.py: fix: do not apply redundant 8 * '00' padding
When the application message payload is encrypted with any variant
of DES, the length of the ciphertext has to be a multiple of 8 bytes
- hence if the plaintext length is not a multiple of 8 bytes, the
plaintext needs to be padded.

If the ciphertext is already aligned, the current logic would append
8 redundant padding octets.  The resulting encrypted message should
be considered malformed per standard specs, but sysmoUSIM-SJS1 cards
are liberal in what they accept in this instance thus the bug went
unnoticed.  The newer sysmoISIM-SJA2 cards do not accept such
malformed messages with invalid padding.

This bug was discovered and reported by the Mother Mychaela, see:
https://lists.osmocom.org/pipermail/openbsc/2021-February/013414.html
2021-02-22 22:35:45 +01:00
Vadim Yanitskiy 8ac76661ce shadysim.py: use string multiplication to add padding 2021-02-22 22:25:43 +01:00
Holger Hans Peter Freyther 51889889e4 shadysim: Make it work with the SMPP mode 2015-12-26 17:27:05 +01:00
Dieter Spaar 68cdcdb88b shadysim: Implement OTA security for sysmoUSIM SJS1 2015-12-26 16:07:56 +01:00
Holger Hans Peter Freyther d08dd0637c Convert line endings to Unix 2015-12-26 08:27:53 +01:00
Duncan Smith c73e85aedb Get and record the name of the subscriber 2014-07-05 17:54:40 -07:00
Duncan Smith 470aa07fad SIM tool for 2014 created 2014-07-05 16:57:29 -07:00
Karl Koscher aaa9ee74d3 Return error messages on delete 2012-08-07 15:35:36 -07:00
Eric Butler febca32896 Added JavaCard stuff. 2012-08-07 15:10:40 -07:00