DDSI-RTPS 2.3 RTF Avatar
  1. OMG Issue

DDSIRTP23 — Incorrect/misleading description of KeyHash computation

  • Key: DDSIRTP23-32
  • Legacy Issue Number: 19730
  • Status: closed  
  • Source: Real-Time Innovations ( Dr. Gerardo Pardo-Castellote, Ph.D.)
  • Summary:

    Section 9.6.3.3 KeyHash (PID_KEY_HASH) says that the KeyHash is either computed as the CDR Big-Endian encapsulation of all the Key fields in sequence, or else as the MD5 of that "CDR Big-Endian encapsulation of all the Key fields in sequence" the decision is based on whether the "CDR Big-Endian encapsulation of all the Key fields in sequence" for that data-type is known to always fit into the 16-byte KeyHash.

    However the text in the first bullet says "If the maximum size of the sequential CDR encapsulation of all the key fields is guaranteed to be less than 128 bits, then the KeyHash shall be computed...

    This is misleading as it leave indeterminate the case when the "the maximum size of the sequential CDR encapsulation of all the key fields" is exactly 128 bits. In this case if the sentence is interpreted to mean "strictly less than 128" then an MD5 should be used. If it is interpreted to mean "less or equal" then no MD5 should be applied.

    Unfortunately this situation occurs on the builtin-topic types because the GUIDs are exactly 16 bytes.

    Proposed Resolution:
    In Section 9.6.3.3 KeyHash (PID_KEY_HASH). In the first bullet, replace:
    "If the maximum size of the sequential CDR encapsulation of all the key fields is guaranteed to be less than 128 bits,"

    With
    "If the maximum size of the sequential CDR encapsulation of all the key fields is guaranteed to be less or equal than 128 bits,"

  • Reported: DDSI-RTPS 2.0b1 — Mon, 2 Mar 2015 05:00 GMT
  • Disposition: Resolved — DDSI-RTPS 2.3
  • Disposition Summary:

    Clarify the KeyHash computation in the case of a CDR encapsulation of exactly 128 bits

    The language describing when to use an MD5 to compute the KeyHash has been clarified to reflect that no MD5 should be used is the serialized length of the key fields is less that or equal to 128 bits, as opposed to strictly less than.

  • Updated: Wed, 19 Dec 2018 16:38 GMT