1 Commits

Author SHA1 Message Date
Philipp Maier
03f7de30df README.md: update example applet build instructions
The build system in hello-stk.git has changed. We now use ANT to build
the applets along with a more modern JAVA SDK.

Related: OS#6069
2023-09-06 11:50:00 +02:00
2 changed files with 6 additions and 6 deletions

View File

@@ -35,10 +35,10 @@ Use the hello-stk example to get started.
$ mkdir javacard
$ cd javacard
$ git clone https://git.osmocom.org/sim/sim-tools
$ git clone https://git.osmocom.org/sim/hello-stk
$ cd hello-stk
$ make
$ git submodule update --init --recursive
$ ant
To install the applet onto a SIM card, first set the type of reader you are using.

View File

@@ -114,10 +114,10 @@ class AppLoaderCommands(object):
# Padding if Ciphering is used
if ((spi_1 & 0x04) != 0): # check ciphering bit
len_cipher = 6 + len_sig + (len(data) / 2)
# 8 Byte blocksize for DES-CBC (TODO: different padding)
if len_cipher % 8 > 0:
pad_cnt = 8 - (len_cipher % 8)
data += '00' * pad_cnt
pad_cnt = 8 - (len_cipher % 8) # 8 Byte blocksize for DES-CBC (TODO: different padding)
# TODO: there is probably a better way to add "pad_cnt" padding bytes
for i in range(0, pad_cnt):
data = data + '00';
# CHL + SPI first octet
part_head = ('%02x' % (0x0D + len_sig)) + ('%02x' % (spi_1))