Project

General

Profile

Actions

Task #4690

closed

URI of NameComponent: strict or ambiguous

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

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

100%

Estimated time:

Description

NDN Packet Format 0.3 encodes a NameComponent as follows:

  • GenericNameComponent does not have a prefix.
  • ImplicitSha256DigestComponent has the prefix sha256digest=.
  • Other typed name components have prefix <number>= where <number> is the TLV-TYPE encoded in decimal format without leading zero.

Since <number>= is applied on "other typed name components" only, it is not permitted to use 8= on GenericNameComponent or 1= on ImplicitSha256DigestComponent.

However, there is proposal to loosen this requirement, and allow 8= on GenericNameComponent or 1= on ImplicitSha256DigestComponent.
This issue is to discuss such proposal, and make necessary protocol updates.

Actions #1

Updated by Alex Afanasyev over 5 years ago

generic URI accepts tons of different representations and, given a potential divergence of implementations, you cannot assume a single URI form, which is simply a human-readable form. There is a strict representation on the wire.

Actions #2

Updated by Junxiao Shi over 5 years ago

I strongly disagree on allowing 1= on ImplicitSha256DigestComponent (and likewise 2= on ParametersSha256DigestComponent defined in #4658), because the encoding format after the equal sign is completely different from "other typed name components". ImplicitSha256DigestComponent uses plain HEX encoding after the equal sign, while other types use percent encoding.

I weakly disagree on allowing 8= on GenericNameComponent. It is best to enforce only one encoding format and no other, so that names can be compared for equality via their URI string. Permitting multiple formats can break existing applications, and NDN Regular Expressions in particular.

Actions #3

Updated by Davide Pesavento over 5 years ago

We need to be careful when we change the NDN URI specification to support a different representation for a new typed name component.
For instance, if a new component with TLV-TYPE=42 is introduced and we specify that it can be URI-encoded as FooComponent=<value>, all "old" URI decoder implementations are broken because they won't be able to decode a URI containing such a component.

Actions #4

Updated by Davide Pesavento over 5 years ago

Junxiao Shi wrote:

I strongly disagree on allowing 1= on ImplicitSha256DigestComponent (and likewise 2= on ParametersSha256DigestComponent defined in #4658), because the encoding format after the equal sign is completely different from "other typed name components". ImplicitSha256DigestComponent uses plain HEX encoding after the equal sign, while other types use percent encoding.

As I said in note-3, we cannot break backward compatibility every time we introduce a new typed name component. The "generic" syntax (<type in decimal>=<percent-encoded value>) must always be allowed.

so that names can be compared for equality via their URI string. Permitting multiple formats can break existing applications, and NDN Regular Expressions in particular.

Using string equality on URIs is wrong and already broken. Don't do it. There isn't a single string representation of a URI.

Actions #5

Updated by Junxiao Shi over 5 years ago

  • Status changed from New to Resolved
  • Assignee set to Junxiao Shi
  • Start date deleted (08/02/2018)
  • % Done changed from 0 to 50

20180806 NFD call approves note-4 decision.

I've updated the spec in https://gerrit.named-data.net/#/c/NDN-TLV/+/4889/

Actions #6

Updated by Junxiao Shi over 5 years ago

  • % Done changed from 50 to 100

https://gerrit.named-data.net/4901 updates ndn-cxx to recognize 1= and 8=, which were previously disallowed.

Actions #7

Updated by Junxiao Shi over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF