Did you check your serialization with test_serialization ? I am pretty sure your length is not in sync with your write implementation. I wouldn't use write_vec but rather ser.write(self.permission as u8) if Serializable is implemented for u8 in cosmian_crypto_core and implement it there if it is not.
Originally posted by @tbrezot in Cosmian/kms#542 (comment)
Did you check your serialization with
test_serialization? I am pretty sure your length is not in sync with yourwriteimplementation. I wouldn't usewrite_vecbut ratherser.write(self.permission as u8)ifSerializableis implemented foru8incosmian_crypto_coreand implement it there if it is not.Originally posted by @tbrezot in Cosmian/kms#542 (comment)