Create APDU to write SIM Toolkit Applets
Go to file
Vadim Yanitskiy f6a806494c 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:
2021-02-22 22:35:45 +01:00
bin Added JavaCard stuff. 2012-08-07 15:10:40 -07:00
javacard Fix some Makefile bugs and add some Windows support 2013-06-24 13:28:26 -07:00
shadysim fix: do not apply redundant 8 * '00' padding 2021-02-22 22:35:45 +01:00
.gitignore Added JavaCard stuff. 2012-08-07 15:10:40 -07:00 update README to indicate Osmocom modifications of the tool 2017-03-17 22:39:52 +01:00

Shadytel SIM Tools

This is a version of the Shadytel Shadysim tools modified and enhanced for the use with the sysmoUSIM-SJS1 sim cards

Contrary to the cards used by the original Shadtyel tools, the sysmoUSIM-SJS1 have OTA security enabled and require the use of KIC/KID to authenticate + encrypt the PDUs of the Remote Application Management (RAM).

GIT Repository

You can clone from the Osmocom sim-tools.git repository using

git clone git://

There is a cgit interface at

Mailing List

Discussions related to sim-tools are happening on the mailing list, please see for subscription options and the list archive.

Please observe the Osmocom Mailing List Rules when posting.

Creating JavaCard STK Applets

Use the hello-stk example to get started.

$ mkdir javacard
$ cd javacard
$ git clone
$ git clone
$ cd hello-stk
$ make

To install the applet onto a SIM card, first set the type of reader you are using.

# For PCSC readers:
$ export SHADYSIM_OPTIONS="--pcsc"

# For USB-serial readers:
$ export SHADYSIM_OPTIONS="--serialport /dev/ttyUSB0"

and follow instructions at

The shadysim tool has lots of other options.

$ ./sim-tools/bin/shadysim --help