Project

General

Profile

Actions

Task #1679

closed

signPacketWrapper: Interest nonce is 64 bits, not 32 bits according to docs

Added by Anonymous almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Docs
Target version:
Start date:
06/19/2014
Due date:
% Done:

100%

Estimated time:
0.50 h

Description

On the NFD wiki, it says the nonce in a signed command interest is 32 bits. "The value of the n-2 th component is random value (32bits)":

http://redmine.named-data.net/projects/nfd/wiki/Command_Interests

But KeyChain::signPacketWrapper creates a 64-bit nonce using generateWord64:

https://github.com/named-data/ndn-cxx/blob/0f5fb696dd53d204272980df53c55d6ccaede059/src/security/key-chain.hpp#L932

Maybe it's not a bug and the Command_Interest page should be changed to call for a 64-bit nonce?

Actions #1

Updated by Alex Afanasyev almost 10 years ago

I kind of tend to think that we better update the spec to allow any value that can be represented in nonNegativeInteger encoding. The value of the nonce is not important and not checked anywhere. The only purpose is to differentiate between different interests (signed by different parties).

Actions #2

Updated by Junxiao Shi almost 10 years ago

  • Category set to Docs
  • Assignee set to Yingdi Yu
  • Target version set to v0.2
  • Estimated time set to 0.50 h

Command Interests is deprecated and replaced by Signed Interests, but it has the same problem.

I agree with the proposal on note-1.

Actions #3

Updated by Yingdi Yu almost 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Spec has been updated. Now a signed interest should contain a 64-bit nonce.

Actions #4

Updated by Alex Afanasyev almost 10 years ago

It should allow either value... It really doesn't matter

Actions #5

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from Feedback to Closed

The spec now accepts a random number encoded in nonNegativeInteger and does not explicitly specify how wide this number should be. In ndn-cxx we will use 64-bit number (which can be encoded shorter than that). Other implementation can choose to use shorter type, if needed.

Actions

Also available in: Atom PDF