esim.bsp: Fix a bug in demac_only_one()
When de-MAC-ing at the recipient side, we must increment the cipher(!) block number even if no ciphering is done at all. We did this correctly for MAC (sender) case, but not on the de-MAC (receiver) case. Change-Id: I97993f9e8357b36401d435aaa15558d1c7e411eb
This commit is contained in:
@@ -287,6 +287,8 @@ class BspInstance:
|
||||
def demac_only_one(self, ciphertext: bytes) -> bytes:
|
||||
payload = self.m_algo.verify(ciphertext)
|
||||
_tdict, _l, val, _remain = bertlv_parse_one(payload)
|
||||
# The data block counter for ICV caluclation is incremented also for each segment with C-MAC only.
|
||||
self.c_algo.block_nr += 1
|
||||
return val
|
||||
|
||||
def demac_only(self, ciphertext_list: List[bytes]) -> bytes:
|
||||
|
||||
Reference in New Issue
Block a user