OX_DATA_WITH_LENGTH is the OX tag for OX data message with a digital signature. It is followed by the serial number, CMO, an end mark and a digital signature. This type of OX data message is called secured OX DATA.
#define OX_SECURED_DATA 521
|int32 OX_DATA_WITH_LENGTH||int32 serial||int32 size||CMObject o||tail|
If size is equal to -1, then it is ignored.
tail is defined as follows.
|int32 CMO_START_SIGNATURE||int32 size||signature|
Here size is the length of signature. signature is a digital signature of CMO data by a Hash function and is used to detect invalid serialized objects. If size of Tail is equal to 0, then it has no digital signature.
Currently there are four modes of communicating data.
Suppose that the mathcap handling is incomplete and an application has received unknown CMObject. In mode 1, the application cannot detect the end of the CMObject and it will not be able to understand the subsequent messages. In mode 2, the application can detect the end of the unknown CMObject from the size information. However, in mode 2, additional cost is required on the sender to compute the total length of CMObjects.
Note that the exchange of mathcaps are not necessary at the start of a session. Any server should be implemented so that it can change the communication mode dynamically, say, from 4 to 1.