Task #1679
closedsignPacketWrapper: Interest nonce is 64 bits, not 32 bits according to docs
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:
Maybe it's not a bug and the Command_Interest page should be changed to call for a 64-bit nonce?
Updated by Alex Afanasyev over 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).
Updated by Junxiao Shi over 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.
Updated by Yingdi Yu over 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.
Updated by Alex Afanasyev over 10 years ago
It should allow either value... It really doesn't matter
Updated by Alex Afanasyev over 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.