`libspdm_decode_secured_message` to support out-of-order message decryption
Reference: https://github.com/DMTF/libspdm/issues/2560
Spec mentions SPDM EndPoint shall NOT send messages with out of sequence.
In case of packet drop/timeout, spec mentions integrator either to END_SESSION or Re-establish NEW Session.
Should there be changes in spec ? Or is there anything integrator can do about this ?
Yeah let me file an issue against the specification on what is meant by that. It should be more clear.
Yeah let me file an issue against the specification on what is meant by that. It should be more clear.
Any response from the authors ? When can libspdm support out-of-order message delivery ?
Any response from the authors ?
Yes. The SPDM Working Group meetings are every Wednesday.
They clarified that 277 itself is not a transport. In particular, if a transport receives messages out-of-order then it is up to the transport layer(s), below 277, to re-arrange things. Individual 277 messages, and their sequence number, cannot be presented to the 277 layer out-of-order, else that is flagged as an error. libspdm is currently consistent with that behavior.
If you'd like to see changes in future specifications let me know and I can get you added to the specification repository where you can file an issue.
Thanks for your response @steven-bellock
I was exploring part of NOT having sequence number for my use case. 277 doesn't recommend having sequence numbers.
In libspdm, I didnt find any option to send packet without sequence numbers. Is there any provision like that ?
The Integrator needs to register. https://github.com/DMTF/libspdm/blob/11a60b3e7386f996fca98c2196cc02605dd3c5c7/include/library/spdm_secured_message_lib.h#L182-L196 libspdm will call this function and the Integrator provides the sequence number as it will appear in the 277 message. Different transports define the size of the 277 message sequence number. For example MCTP defines it to be the lower two bytes of the full eight byte sequence number.
@PrithviAPai please close this issue if it has been resolved / answered.