Re: [dtn] BPSec handling of target CRC

"Birrane, Edward J." <Edward.Birrane@jhuapl.edu> Fri, 08 January 2021 18:49 UTC

Return-Path: <Edward.Birrane@jhuapl.edu>
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 8EF2B3A11D4 for <dtn@ietfa.amsl.com>; Fri, 8 Jan 2021 10:49:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=jhuapl.edu
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 JgA5mI_emvzW for <dtn@ietfa.amsl.com>; Fri, 8 Jan 2021 10:49:49 -0800 (PST)
Received: from aplegw02.jhuapl.edu (aplegw02.jhuapl.edu [128.244.251.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AC3E13A11CF for <dtn@ietf.org>; Fri, 8 Jan 2021 10:49:49 -0800 (PST)
Received: from pps.filterd (aplegw02.jhuapl.edu [127.0.0.1]) by aplegw02.jhuapl.edu (8.16.0.42/8.16.0.42) with SMTP id 108Iicij133292; Fri, 8 Jan 2021 13:49:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhuapl.edu; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=JHUAPLDec2018; bh=mBQ314r48Ta7Kn/82815Ve1t2EfeYNANGTYx9VL8T60=; b=bwq3tjoxeUwxT0TAoQxUI+Kh9nt8VaBjmu6ePzMnJsep9+qJH5Fb9XwS7bpr5r5nB2// v3KWrIKpXx60as9BfIZAA/Oi5gXKprcTbtAF1XkRhtSn+lcKPTjuRkEY68tvAlwdujV8 Rn/RRUXLCdM2c5ZK+ZzP7s9dKftCLjVSCaShPeJ0WheCTFu3IkqCkdovXWSQbqa/5aia mkW3Lx+LP/oEWgJVMhh8fqLzq6poMPl8COQlBeR7SO1FNjU0rachfPwda7k35K5hPA0k 8z56YYZLdFRhNIl6FhHjRmxa0yZNedQt/0At1GHKyia0JmOKgBZGeNpR/Eoab+ifq6iF zA==
Received: from aplex02.dom1.jhuapl.edu (aplex02.dom1.jhuapl.edu [128.244.198.6]) by aplegw02.jhuapl.edu with ESMTP id 35tnx14hdg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Jan 2021 13:49:48 -0500
X-CrossPremisesHeadersFilteredBySendConnector: aplex02.dom1.jhuapl.edu
Received: from aplex01.dom1.jhuapl.edu (128.244.198.5) by aplex02.dom1.jhuapl.edu (128.244.198.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 Jan 2021 13:49:47 -0500
Received: from aplex01.dom1.jhuapl.edu ([fe80::19f5:dcc5:c696:1a50]) by aplex01.dom1.jhuapl.edu ([fe80::19f5:dcc5:c696:1a50%25]) with mapi id 15.00.1497.007; Fri, 8 Jan 2021 13:49:47 -0500
From: "Birrane, Edward J." <Edward.Birrane@jhuapl.edu>
To: Brian Sipos <BSipos@rkf-eng.com>, "dtn@ietf.org" <dtn@ietf.org>
Thread-Topic: BPSec handling of target CRC
Thread-Index: AQHW2JEkhlkPDot0SUGJf4Q4luFkUKoeJgVQ
Date: Fri, 08 Jan 2021 18:49:46 +0000
Message-ID: <02537aa77152419d986ae4446f712f06@aplex01.dom1.jhuapl.edu>
References: <MN2PR13MB3567B2E7CEDB74B65728E7389FDF0@MN2PR13MB3567.namprd13.prod.outlook.com>
In-Reply-To: <MN2PR13MB3567B2E7CEDB74B65728E7389FDF0@MN2PR13MB3567.namprd13.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [128.244.198.169]
Content-Type: multipart/alternative; boundary="_000_02537aa77152419d986ae4446f712f06aplex01dom1jhuapledu_"
MIME-Version: 1.0
X-OrganizationHeadersPreserved: aplex02.dom1.jhuapl.edu
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-08_08:2021-01-07, 2021-01-08 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/AMkNx9ermECCClhnURvRfrJlPxU>
Subject: Re: [dtn] BPSec handling of target CRC
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: Fri, 08 Jan 2021 18:49:52 -0000

Brian,

  BPSec intentionally does not require a specific approach to handling the CRC values of (a) a security target or (b) a security block.  Special handling of CRC values should be specified in the security contexts because the security contexts are the documents specifying the parameters, algorithms, and behaviors that change the block contents.


  For example, it might be reasonable to a BCB to take the CRC Type and CRC field of its target block and store it as a security parameter in the BCB itself and include it as part of the AAD when encrypting the target. The target could have its plain-text CRC type and result field removed, and, upon decryption, the BCB could restore the CRC information for the target.   But there are many permutations and special cases: what if a security context appends AAD inside the target block instead of as a BCB results parameter? Do you then have a CRC-used-to-generate-AAD and then another CRC in the target block which covers the updated ciphertext-with-appended-AAD?



  This is a very valuable discussion to have - but I think it should happen in the context of security contexts.



  To that end, I propose:



1.       I can add some text to BPSEC 9.3 explaining more clearly that CRC considerations include more than whether to include CRC values as AAD.

2.       Place a statement in the current default security contexts that CRC values be removed from an extension block when they are a security target (even for a BIB) and a CRC shall be calculated on an extension block when a security service is removed.



-Ed
---
Edward J. Birrane, III, Ph.D.
Embedded Applications Group Supervisor
Space Exploration Sector
Johns Hopkins Applied Physics Laboratory
(W) 443-778-7423 / (F) 443-228-3839


From: Brian Sipos <BSipos@rkf-eng.com>
Sent: Tuesday, December 22, 2020 11:39 PM
To: dtn@ietf.org; Birrane, Edward J. <Edward.Birrane@jhuapl.edu>
Subject: [EXT] BPSec handling of target CRC

APL external email warning: Verify sender BSipos@rkf-eng.com<mailto:BSipos@rkf-eng.com> before clicking links or attachments



Ed,
The current BPSec draft [1] seems to be silent about what a security source is supposed to do with BIB-target block CRC Type and CRC Value fields. It's clear that adding a BIB targeting a block will affect the block-type-specific data, but not clear whether there is an obligation to also update (or remove) CRC fields while adding BIB blocks.
Likewise, I don't see any obligation of the security acceptor to do anything to "put back" any CRC fields.

Slightly related, Section 9.3 "Authorship" does recommend that security contexts take into account target block CRC fields as additional authenticated data (AAD). This is not terrible, but it adds fragility and potential interoperability problems.
The contexts in [2], correctly I think, ignore CRC type and value of target blocks for generating IPPT and AAD data.

A BIB and a BCB which both target the same block (the BIB to provide data origination, and the BCB to provide encryption) could collide if the BCB processing does not "put back" the original CRC fields. But then what if the original CRC value was invalid?
It seems like a prohibition on security sources doing anything on a target block with an invalid CRC value, or an explicit requirement that security contexts leave-out CRC value as AAD, is needed.
Although the BCB-and-BIB with the same target is prohibited when only data integrity is desired, this use case is to provide data origination bound to a security source's public key / certificate.

My own feeling on this is that security sources should preserve the CRC Type (as the block originator set it for a reason) and update the CRC Value for the new block data, and security acceptors should update the CRC Value when processing a BIB target.

[1] https://tools.ietf.org/html/draft-ietf-dtn-bpsec-25
[2] https://tools.ietf.org/html/draft-ietf-dtn-bpsec-interop-sc-02