Subject: Re: [dtn] working group last call on draft-ietf-dtn-bpbis

From: Lucas Kahlert <[email-masked]>
Date: Mon, 6 Feb 2017 19:01:09 +0100

Hello,

I am a student currently implementing the BPbis draft in 
[upcn](http://upcn.eu/) using the stateless callback-based streaming API 
of libcbor.

# Relocating the CRC field

As already mentioned by Brian Sipos and Marius Feldmann the position of 
the checksum should be relocated to the end of each extension block.

In the current draft it is quite tricky to calculate the CRC of an 
extension block "on-the-fly" (calculating the CRC checksum while you are 
decoding or serializing CBOR chunks). If the CRC is located at the end 
of a block (like in the primary block) you can use the CBOR encoding 
result for each field to calculate the CRC checksum and at the end of 
the block augment the CRC with appropriate zero-bytes and encode the 
checksum as CBOR.

For extension blocks the CBOR encoded data length and data must be known 
*before* it is written to the output. You have to skip the CRC-CBOR 
bytes first, store a pointer to the output buffer, proceed with the data 
length and data encoding and after that finish the CRC calculation and 
write the checksum into the stored buffer location. This makes the 
implementation rather complicated.

# Fixed-size byte-string encoding

I also would recommend a fixed-size byte-string encoding for the 
CRC-field to avoid confusion about a "compressed" checksum representation.

Regards,
Lucas

On 23.01.2017 17:11, Brian Sipos wrote:
> Scott,
>
> I have no new comments for the BPbis draft, but just want to re-state some earlier discussion:
>
> - On the checksum field position/contents, I believe that we had settled on relocating the checksum to the end of each block and to use a fixed-size byte-string encoding (to avoid ambiguities).
>
> - I had recommended to include some language in the spec about a BP agent accepting alternate, non-canonical encodings (e.g. indefinite-length vs. definite-length arrays) and then possibly canonicalize the bundle. An agent performing canonicalization would have implications for BPSEC down the road, just to keep in mind.
>
>
> ________________________________
> From: dtn <[email-masked]> on behalf of Marc Blanchet <[email-masked]>
> Sent: Friday, January 6, 2017 8:34:42 AM
> To: dtn
> Subject: [dtn] working group last call on draft-ietf-dtn-bpbis
>
> Hello,
>   following last IETF meeting in Seoul, this message is a 4 week working
> group last call on draft-ietf-dtn-bpbis, terminating on friday February
> 3rd 2017, 23h59 UTC. This wg last call is simultaneous for 2 documents,
> since the intent is to forward them together to the IESG.
>   Please send your comments to the mailing list with the subject as this
> message.
>
> Regards, Marc&Rick, dtn wg co-chairs
>
> _______________________________________________
> dtn mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/dtn
> dtn Info Page - Internet Engineering Task Force<https://www.ietf.org/mailman/listinfo/dtn>
> www.ietf.org
> "This list is for discussions related to the formation of a Delay Tolerant Networking (DTN) working group. The IRTF DTNRG research group has worked on the particular ...
>
>
>
>
>
> _______________________________________________
> dtn mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/dtn
>