Project

General

Profile

Actions

Bug #4946

closed

VAR-NUMBER definition conflicts with canonical order algorithm

Added by Junxiao Shi almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Currently, in the definition of VAR-NUMBER, there was no requirement to use the minimum length encoding for any given value.
That is, a TLV-LENGTH of 0x20 MAY be encoded as 0x20, or 0xFD0020, or 0xFE00000020, or even 0xFF0000000000000020.

This has consequences in the canonical ordering and matching code: the suggestion that one can use memcmp on the wire encoding of the Name field's TLV-VALUE is incorrect.
As currently specified, even a simple equality match for Names must decode each individual T and L value from the top level Name TLV through the component T and L values.
If TLV-LENGTH of one NameComponent was encoded 0x20 and TLV-LENGTH of another NameComponent was encoded 0xFD0020, a simple memcmp will produced an incorrect result.

https://www.lists.cs.ucla.edu/pipermail/ndn-interest/2019-May/002458.html

Actions #1

Updated by Junxiao Shi almost 5 years ago

  • Status changed from New to Resolved
  • Assignee set to Junxiao Shi
  • % Done changed from 0 to 70
Actions #2

Updated by Junxiao Shi almost 5 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 70 to 100
Actions

Also available in: Atom PDF