Compare commits
2 Commits
master
...
fixeria/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6a806494c | ||
|
|
8ac76661ce |
@@ -35,10 +35,10 @@ Use the hello-stk example to get started.
|
|||||||
|
|
||||||
$ mkdir javacard
|
$ mkdir javacard
|
||||||
$ cd javacard
|
$ cd javacard
|
||||||
|
$ git clone https://git.osmocom.org/sim/sim-tools
|
||||||
$ git clone https://git.osmocom.org/sim/hello-stk
|
$ git clone https://git.osmocom.org/sim/hello-stk
|
||||||
$ cd hello-stk
|
$ cd hello-stk
|
||||||
$ git submodule update --init --recursive
|
$ make
|
||||||
$ ant
|
|
||||||
|
|
||||||
To install the applet onto a SIM card, first set the type of reader you are using.
|
To install the applet onto a SIM card, first set the type of reader you are using.
|
||||||
|
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ class AppLoaderCommands(object):
|
|||||||
# Padding if Ciphering is used
|
# Padding if Ciphering is used
|
||||||
if ((spi_1 & 0x04) != 0): # check ciphering bit
|
if ((spi_1 & 0x04) != 0): # check ciphering bit
|
||||||
len_cipher = 6 + len_sig + (len(data) / 2)
|
len_cipher = 6 + len_sig + (len(data) / 2)
|
||||||
pad_cnt = 8 - (len_cipher % 8) # 8 Byte blocksize for DES-CBC (TODO: different padding)
|
# 8 Byte blocksize for DES-CBC (TODO: different padding)
|
||||||
# TODO: there is probably a better way to add "pad_cnt" padding bytes
|
if len_cipher % 8 > 0:
|
||||||
for i in range(0, pad_cnt):
|
pad_cnt = 8 - (len_cipher % 8)
|
||||||
data = data + '00';
|
data += '00' * pad_cnt
|
||||||
|
|
||||||
# CHL + SPI first octet
|
# CHL + SPI first octet
|
||||||
part_head = ('%02x' % (0x0D + len_sig)) + ('%02x' % (spi_1))
|
part_head = ('%02x' % (0x0D + len_sig)) + ('%02x' % (spi_1))
|
||||||
|
|||||||
Reference in New Issue
Block a user