mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-30 10:42:53 +03:00
OTA: Set PCNT (padding count) in messages
Change-Id: Ia3cb4222ebe7f8922c96509a94cf126db3dea14c
This commit is contained in:
@@ -344,7 +344,9 @@ class OtaDialectSms(OtaDialect):
|
|||||||
if spi['ciphering']: # ciphering is requested
|
if spi['ciphering']: # ciphering is requested
|
||||||
# append padding bytes to end up with blocksize
|
# append padding bytes to end up with blocksize
|
||||||
len_cipher = 6 + len_sig + len(apdu)
|
len_cipher = 6 + len_sig + len(apdu)
|
||||||
apdu += otak.crypt._get_padding(len_cipher, otak.crypt.blocksize)
|
padding = otak.crypt._get_padding(len_cipher, otak.crypt.blocksize)
|
||||||
|
pad_cnt = len(padding)
|
||||||
|
apdu += padding
|
||||||
|
|
||||||
kic = {'key': otak.kic_idx, 'algo': otak.algo_crypt}
|
kic = {'key': otak.kic_idx, 'algo': otak.algo_crypt}
|
||||||
kid = {'key': otak.kid_idx, 'algo': otak.algo_auth}
|
kid = {'key': otak.kid_idx, 'algo': otak.algo_auth}
|
||||||
|
|||||||
Reference in New Issue
Block a user