laforge uploaded patch set #2 to the change originally created by hampushellsberg.

View Change

esim.bsp: keep encrypted segments within 1020 bytes

SGP.22 limits a segment to 1020 bytes including tag, length field and
MAC, which leaves 1008 bytes for the ciphertext. encrypt_and_mac() cut
the plaintext at 1008 bytes; the mandatory '80' padding then added a
whole block and the segment got 1036 bytes long. An eUICC that enforces
the limit can refuse the first such segment of a profile. Cut encrypted
plaintext at 1007 bytes; MAC-only segments keep 1008.

The folder osmocom-pysim-bsp-segment-size of
hampushellsberg-dev/PySIM-upstream-patches on GitHub has the analysis
and a repro.

Change-Id: Ie59a8fb3d6cefc079e4e065d8ab9bd9cec886513
Closes: OS#7120
---
M pySim/esim/bsp.py
M tests/unittests/test_esim_bsp.py
2 files changed, 37 insertions(+), 3 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/44153/2

To view, visit change 44153. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie59a8fb3d6cefc079e4e065d8ab9bd9cec886513
Gerrit-Change-Number: 44153
Gerrit-PatchSet: 2
Gerrit-Owner: hampushellsberg <hampushellsberg@gmail.com>
Gerrit-Reviewer: Jenkins Builder