pysim/pySim
Harald Welte 219a5f369c OTA: Fix padding of AES CMAC
When using AES CMAC for authentication of OTA messages, we must not pad
the user data before calling the CMAC function. This is unlike the DES
MAC, where padding to the DES block size is mandatory.

This bug was discovered when trying to talk OTA with AES to a
sysmoISIM-SJA5.  This patch makes the OTA AES interoperate with the
card.  Also, with this patch the cryptographic results of pySim/ota.py
are identical to those of the java code
org.opentelecoms.gsm0348.impl.crypto.CipheringManager

Change-Id: I4b40b5857f95ccb21c35795abe7a1995e368bac3
2023-06-03 12:45:35 +00:00
..
apdu Prepare for decoding/encoding records differently based on record number 2023-01-24 20:03:02 +01:00
apdu_source pySim-trace: Add support for reading GSMTAP from pcap files 2023-01-24 13:50:51 +01:00
transport modem_atcmd: raise ProtocolError instead of ReaderError on CME ERROR 2023-06-02 15:35:43 +00:00
__init__.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
ara_m.py doc: Improve documentation in various places 2022-02-15 16:40:45 +01:00
card_handler.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
card_key_provider.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
cards.py cards: Add support for Gialer SIM cards 2023-05-27 12:37:16 +02:00
cat.py Add TLV definitions for *a lot more* CAT / USAT data objects 2022-08-06 18:56:42 +02:00
cdma_ruim.py Add very basic profile for R-UIM (CDMA) cards 2023-05-10 00:14:13 +00:00
commands.py SimCardCommands.run_gsm(): use send_apdu_checksw() 2023-03-22 09:57:32 +00:00
construct.py SJA2: Implement DF.SYSTEM/EF.0348_KEY using construct 2023-06-03 12:45:35 +00:00
exceptions.py Fix printing of SwMatchError after introduction of logical channels 2022-07-30 16:37:01 +02:00
filesystem.py modem_atcmd: raise ProtocolError instead of ReaderError on CME ERROR 2023-06-02 15:35:43 +00:00
global_platform.py Initial support for GlobalPlatform 2022-03-01 16:32:15 +00:00
gsm_r.py filesystem: add unit tests for encoder/decoder methods 2023-02-01 10:52:23 +01:00
gsmtap.py Introduce APDU/TPDU trace decoder 2022-07-23 12:18:57 +02:00
iso7816_4.py cosmetic: Remove extraneous empty lines between spec-section-comment and class 2022-02-14 00:51:27 +01:00
jsonpath.py cosmetic: Switch to consistent four-spaces indent; run autopep8 2022-02-11 13:32:58 +01:00
ota.py OTA: Fix padding of AES CMAC 2023-06-03 12:45:35 +00:00
profile.py Add very basic profile for R-UIM (CDMA) cards 2023-05-10 00:14:13 +00:00
sms.py Add new pySim.ota library, implement SIM OTA crypto 2022-09-08 15:45:55 +02:00
sysmocom_sja2.py SJA5: Proper encode/decode of TUAK data in EF.USIM_AUTH_KEY 2023-06-03 12:45:35 +00:00
tlv.py tlv: Use self._compute_tag() method rather than direct self.tag 2022-08-06 13:19:16 +02:00
ts_31_102.py ts_31_102: EF_SUPI_NAI: Decode/Encode GLI+GCI as UTF-8 strings 2023-06-03 12:45:35 +00:00
ts_31_102_telecom.py filesystem: add unit tests for encoder/decoder methods 2023-02-01 10:52:23 +01:00
ts_31_103.py filesystem: add unit tests for encoder/decoder methods 2023-02-01 10:52:23 +01:00
ts_51_011.py ts_51_011: Fix EF.Phase FID (it's 6FAE, not 6FA3) 2023-05-25 07:55:44 +00:00
ts_102_221.py filesystem: add unit tests for encoder/decoder methods 2023-02-01 10:52:23 +01:00
ts_102_222.py ts_102_222: Implement support for RESIZE FILE for an EF 2023-03-09 09:49:40 +00:00
utils.py commands: add ".." notation to expand hexstrings 2022-06-03 10:26:58 +02:00