Issue 19730: Incorrect/misleading description of KeyHash computation (ddsi-rtps-rtf) Source: Real-Time Innovations (Dr. Gerardo Pardo-Castellote, Ph.D., gerardo(at)rti.com) Nature: Uncategorized Issue Severity: 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," Resolution: Revised Text: Actions taken: March 2, 2015: received issue Discussion: End of Annotations:===== ogle-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=abz4YK1Ye2MSZMcQZrRVr1WlIOWw2b+LKzkSyr1oRDM=; b=mgRVmA83GweGw5wKTwe7UyPwe6gqE/e7uRcFtDsB83yAR5DyZIEDeRJfdQLE3bY60C gj8GAaQRDe50R/nfb1n9NpDzP6VvDSg7H4u+t7jSj0PR2jtxuQrIjQDWlxldlDPgiuLC C4pns8ninkriZV51qyyJWGueWrOmUn/EA8eCFv4K6Puexh4o6F+KGo/cuutIaQCKy57y IjHQzz7/rL3qrIwE4g+ZA608beiQmS5kuafs28ONfQdtYBDF7D79W/FR61Et8yxdGXG/ 2D6qDA7XYVVhgqlb1TggraAKag53z3FQx2V+kR5fPWNXfbNscHJtl4LXr7VDmf8kzRd5 JaZA== X-Gm-Message-State: ALoCoQnd4hXSt8sCxTjTvyb7QWORc/f71+Pn6VnyvBZDxEycGtz06xnIUfunN5QtN/VNy4ONYc37 X-Received: by 10.202.26.72 with SMTP id a69mr16972677oia.119.1425279373504; Sun, 01 Mar 2015 22:56:13 -0800 (PST) From: Gerardo Pardo Date: Sun, 1 Mar 2015 22:55:53 -0800 Subject: ddsi-rtps RTF issye To: issues@omg.org X-Virus-Scanned: amavisd-new at omg.org Incorrect/misleading description of KeyHash computation. 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," Gerardo Gerardo Pardo-Castellote, Ph.D. CTO - Real-Time Innovations, Inc. RTI - Your Systems working as One