Re: [dtn] DTN BPv7 test bundles and CRCs

Brian Sipos <BSipos@rkf-eng.com> Thu, 28 March 2019 12:44 UTC

Return-Path: <BSipos@rkf-eng.com>
X-Original-To: dtn@ietfa.amsl.com
Delivered-To: dtn@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A103F12025C for <dtn@ietfa.amsl.com>; Thu, 28 Mar 2019 05:44:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=rkfeng.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1KBNtu3znFoa for <dtn@ietfa.amsl.com>; Thu, 28 Mar 2019 05:44:31 -0700 (PDT)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0625.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::625]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E166D12024A for <dtn@ietf.org>; Thu, 28 Mar 2019 05:44:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rkfeng.onmicrosoft.com; s=selector1-rkfeng-com0i; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lRW6/IPLK47/aqJ19e7y27T7ztDekZruNtbmt/vhtvc=; b=BvO9i9htkZ4jb0ZjF/1xZx8/EIM7fJkI9S3owshuJh439VlIGlhkhbWbHxHdYG+tWQa8VXN5rYduFTl7q6yGoWrVNdzdO9uLBFx4Ts/A0rf9dtl2UGq2QOOvSqFtN5nSlxmZDJWokzgC0nbl+VyaGqmd5Qdhsw5KR2belkqTySI=
Received: from CY4PR1301MB2039.namprd13.prod.outlook.com (10.171.240.14) by CY4PR1301MB2134.namprd13.prod.outlook.com (10.171.240.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.15; Thu, 28 Mar 2019 12:44:23 +0000
Received: from CY4PR1301MB2039.namprd13.prod.outlook.com ([fe80::8d3e:bd54:ba51:7933]) by CY4PR1301MB2039.namprd13.prod.outlook.com ([fe80::8d3e:bd54:ba51:7933%5]) with mapi id 15.20.1750.014; Thu, 28 Mar 2019 12:44:23 +0000
From: Brian Sipos <BSipos@rkf-eng.com>
To: "dtn@ietf.org" <dtn@ietf.org>, Scott Burleigh <scott.c.burleigh@jpl.nasa.gov>
Thread-Topic: DTN BPv7 test bundles and CRCs
Thread-Index: AQHU4MX70KrTQEdcJ06prCxjO0TiXaYc8wVn
Date: Thu, 28 Mar 2019 12:44:23 +0000
Message-ID: <CY4PR1301MB2039483EFF873C2823A966159F5E0@CY4PR1301MB2039.namprd13.prod.outlook.com>
References: <CY4PR1301MB2039A571321298DB5E470C959F420@CY4PR1301MB2039.namprd13.prod.outlook.com>
In-Reply-To: <CY4PR1301MB2039A571321298DB5E470C959F420@CY4PR1301MB2039.namprd13.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=BSipos@rkf-eng.com;
x-originating-ip: [38.100.63.114]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4edbf1ff-04f1-4413-cd30-08d6b37b1ae7
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(5600127)(711020)(4605104)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(2017052603328)(7153060)(7193020); SRVR:CY4PR1301MB2134;
x-ms-traffictypediagnostic: CY4PR1301MB2134:
x-ms-exchange-purlcount: 6
x-microsoft-antispam-prvs: <CY4PR1301MB213433634458775CC56719CC9F590@CY4PR1301MB2134.namprd13.prod.outlook.com>
x-forefront-prvs: 0990C54589
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(39830400003)(346002)(396003)(199004)(189003)(71200400001)(14454004)(3846002)(256004)(25786009)(2906002)(486006)(6116002)(110136005)(26005)(7696005)(68736007)(102836004)(446003)(97736004)(86362001)(508600001)(71190400001)(72206003)(186003)(966005)(80792005)(33656002)(66066001)(8676002)(2501003)(81166006)(316002)(52536014)(229853002)(5660300002)(81156014)(74316002)(54896002)(606006)(9686003)(6306002)(236005)(55016002)(19627405001)(6506007)(476003)(8936002)(53546011)(6246003)(11346002)(76176011)(99286004)(106356001)(105586002)(7736002)(105004)(6436002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1301MB2134; H:CY4PR1301MB2039.namprd13.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: rkf-eng.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: wKO9oupLcdj9eMQKMijmzfngtEH/XbXoYeM22jYK4/Q/AeaSA2qHN6z7h9j7DmB2Q+cUp1gG8+/f7+0/JYpw6npWVMZD5hdGwn6qYVFYWAncQZiGxn0W5crbLnZSOdlvCw3TKSsPiQVxpgw854fw2JZMieSxwEylO1ANvIo52nIYRG7r+BvV5h0JqKp4dYNPjKHoG561MHab5NNUOJLa6CCoPQGngUFep2d2G0Obe0aAzMDhpVu2RmNCibeO5hNQvLnlDikUCiF/yRNm4U+Zon+Vf0nqPZogycmnkLndwoe1WYK8Tv8e2l0x+qRrRAvL/lMbT37t1ry7M/vgpl0YHxwI705HWaUt/wAiTtkiX0mHmKz9sbHvGJByeyTjtF9Hp33KWXMflW4LP1DJYBagz2Lc6uznL9Q9oCUJj2SH0Xo=
Content-Type: multipart/alternative; boundary="_000_CY4PR1301MB2039483EFF873C2823A966159F5E0CY4PR1301MB2039_"
MIME-Version: 1.0
X-OriginatorOrg: rkf-eng.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4edbf1ff-04f1-4413-cd30-08d6b37b1ae7
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 12:44:23.2401 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4ed8b15b-911f-42bc-8524-d89148858535
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1301MB2134
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/0qmKbiu6LjJ5-8zcZz6rkAq3A8Y>
Subject: Re: [dtn] DTN BPv7 test bundles and CRCs
X-BeenThere: dtn@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Delay Tolerant Networking \(DTN\) discussion list at the IETF." <dtn.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dtn>, <mailto:dtn-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dtn/>
List-Post: <mailto:dtn@ietf.org>
List-Help: <mailto:dtn-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dtn>, <mailto:dtn-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Mar 2019 12:44:35 -0000

All,
Thank you for the pointers to other implementations. I was able to reconcile the CRCs listed in the BPv7 spec with the 16-bit CRC listed at [1] and the 32-bit CRC listed at [2], both of these references have "check" results for test input.

To Scott B.,
I think the current citation in [3] is not accurate, the ITU-T V.42 spec is *not* the same as the CRC-32C identified in BPv7. I would suggest citing the same reference as was done in [4] and it would be extremely helpful to have CRC examples as are included in [5].
I was being very careful to cross-check my CRC use, but a naive implementation which only checks bundles generated by itself could easily use the wrong CRC parameterization and end up not being interoperable and not know it.

Thanks,
Brian S.

[1]: http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat.crc-16-ibm-sdlc
[2]: http://reveng.sourceforge.net/crc-catalogue/17plus.htm#crc.cat.crc-32-castagnoli
[3]: https://tools.ietf.org/html/draft-ietf-dtn-bpbis-12#ref-CRC
[4]: https://tools.ietf.org/html/rfc7143#ref-Castagnoli93
[5]: https://tools.ietf.org/html/rfc7143#appendix-A.4<https://tools.ietf.org/html/rfc7143>


________________________________
From: dtn <dtn-bounces@ietf.org> on behalf of Brian Sipos <BSipos@rkf-eng.com>
Sent: Friday, March 22, 2019 11:45
To: dtn@ietf.org
Subject: [dtn] DTN BPv7 test bundles and CRCs

To anyone who has been prototyping Bundle Protocol version 7 (BPbis) agents,
I'm spending a little time on a Wireshark dissector to examine and troubleshoot bundles and the only trouble I've run into is in verifying the CRCs. The BPbis spec is not very helpful in determining exactly what CRC implementation to use only because the ITU specification itself doesn't provide CRC test vectors.

I'm doing prototyping in Python and dissecting in C language, so there is even a disparity between what CRC algorithms are available and how well they are documented. This seems like such an easy use/build decision to use COTS CRC function but I'm struggling to find implementations to match what BPbis requires.

I think there would be a lot of value to have some test/representative bundles in an appendix which include blocks with different CRC types and different block sizes. Some CRC implementations pad out octet-sequences to a multiple of the CRC size and some apparently do something else. The problem is in the CRC implementations not being very clear about their parameters but having a few encoded test bundles to work with would go a long way to ensuring compatibility of implementations.

Thanks for any advice,
Brian S.