Re: [tcpm] [Technical Errata Reported] RFC5926 (5267)

Theodore V Faber <theodore.v.faber@aero.org> Thu, 29 March 2018 15:55 UTC

Return-Path: <prvs=6192498af=theodore.v.faber@aero.org>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9B35412DA41 for <tcpm@ietfa.amsl.com>; Thu, 29 Mar 2018 08:55:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=aero.org header.b=GzGQQoor; dkim=pass (1024-bit key) header.d=aerospacecloud.onmicrosoft.com header.b=E/bHSG8G
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 Cv7IIpk9ps9q for <tcpm@ietfa.amsl.com>; Thu, 29 Mar 2018 08:55:38 -0700 (PDT)
Received: from email3-east.aero.org (email3-east.aero.org [130.221.184.167]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C83E6129C53 for <tcpm@ietf.org>; Thu, 29 Mar 2018 08:55:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aero.org; i=@aero.org; q=dns/txt; s=mailhub; t=1522338937; x=1553874937; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=94kKadpmzJxg0IeeMSxfijDg0MiPRv8Sv1nU71+G+YM=; b=GzGQQoorTHeZu+XLtEj8vODAZ0Y0fCmKCOcRvhf0llwzyEXSEJpoi+AY bbqGWKGe8s4mTRBAZY+NWigFxqxFUzoKBJXFa92tWX3si36g+IFZ2fJfA 7/95CFy6p5pr0nlqVkT3kQaO/EcF89MWYwfzA/VLmbenz1uxvkJLnEx4F s=;
x-SBRS: 3.5
x-SenderGroup: Inbound_Office365
X-IronPort-AV: E=McAfee;i="5900,7806,8847"; a="6609964"
X-IronPort-AV: E=Sophos;i="5.48,376,1517904000"; d="scan'208";a="6609964"
X-IPAS-Result: A2EyAAAPDL1ahw/GZxdaAxkBAQEBAQEBAQEBAQEHAQEBAQGCb1BkYAQLKAqLUl6LYII4gQ95kVgUgREDGBcgAwsYCwiEWQKEOzQYAQIBAQEBAQECAxABAQEIDQkIKCMMgmsvHCoFAQEBAQEBJgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAwINJwosAQEBAQIBAQE+AQEsCwEECwIBCBEEAQEBLicLHQgCBAENBQiEbQMNCAEOoW8CigKDCYJuAQEFhA8YgSGCIgiGP4MygQyDBIFBgVABAYEpARIBHwIfJoJpgiSHJBuEPYESiicIiB2HPoNWglmEVI9TAgICAgkCDQEBBYElHIEacU0wISGCQwmCCxqDToUThT5vAYw/gSABgRYBAQ
Received: from mail-cy1gcc01lp0015.outbound.protection.outlook.com (HELO GCC01-CY1-obe.outbound.protection.outlook.com) ([23.103.198.15]) by email3-east.aero.org with ESMTP/TLS/AES256-GCM-SHA384; 29 Mar 2018 08:55:28 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aerospacecloud.onmicrosoft.com; s=selector1-aero-org; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=f6blGlB/78PJSbNeex1pziByy++M/c01dkdZ6GpPlLw=; b=E/bHSG8GyItOvWUK/zetorMmV3OdPOBscAnR6Z4Fm4a1FKHM+xXWpUv46WoP2tYEjbG2Ypfek7XWAJc+HSVsG8vsk+hJ30ov/Ir5Pp6mFstlvQkKJCnxbUmSPiYBX3f9a2oZJGlc67PKpcIn6INp82HVw+pLgaeXR3zkqI6qHfo=
Received: from CY4PR09MB2278.namprd09.prod.outlook.com (10.172.140.12) by CY4PR09MB2279.namprd09.prod.outlook.com (10.172.140.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Thu, 29 Mar 2018 15:55:26 +0000
Received: from CY4PR09MB2278.namprd09.prod.outlook.com ([fe80::3943:92db:ada0:4bb8]) by CY4PR09MB2278.namprd09.prod.outlook.com ([fe80::3943:92db:ada0:4bb8%18]) with mapi id 15.20.0609.012; Thu, 29 Mar 2018 15:55:26 +0000
From: Theodore V Faber <theodore.v.faber@aero.org>
To: "touch@strayalpha.com" <touch@strayalpha.com>, "Brian Weis (bew)" <bew@cisco.com>
CC: "tcpm@ietf.org" <tcpm@ietf.org>, "ekr@rtfm.com" <ekr@rtfm.com>, "tuexen@fh-muenster.de" <tuexen@fh-muenster.de>, "ietf@kuehlewind.net" <ietf@kuehlewind.net>, RFC Editor <rfc-editor@rfc-editor.org>
Thread-Topic: [tcpm] [Technical Errata Reported] RFC5926 (5267)
Thread-Index: AQHTr+Rofu3OuCaSNE6Yu/bE1A7P9aO56M8AgCxRIoCAAVCZgIAAAdlU
Date: Thu, 29 Mar 2018 15:55:26 +0000
Message-ID: <CY4PR09MB2278E1111F793498400775D5B9A20@CY4PR09MB2278.namprd09.prod.outlook.com>
References: <20180226190209.F3D43B80E1F@rfc-editor.org> <A1D80502-1BFA-4F12-9978-D74DE20EB4CA@strayalpha.com> <8B1FAC72-2B18-4406-A3D3-E3BE5524EB59@cisco.com>, <cab9312222159c07346b5dd5cfd9ce9e@strayalpha.com>
In-Reply-To: <cab9312222159c07346b5dd5cfd9ce9e@strayalpha.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=theodore.v.faber@aero.org;
x-originating-ip: [130.221.224.7]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; CY4PR09MB2279; 7:tLQbyAFgxc9eagvmk1Qmd7RXNMr5lfW3MWqkGhPII3A4T7ItV5QxKZFnzBXkVDT3RyySgh1GsKamIeTQYH61I2ftxvPH6SwbXcIVwuMzLbQiQeayjbi09Hc8DJU+dSdKs4LrsxLzxGaGFhmFkHnvya2hzXC+sSFTdF+H+/VUCXN7koU+0jwaV5YVRMwWgFtwp1nqjO/G1WwseAQHPJbE04Hi0cyCj3A8VYakEb1WnUMr86smHN3Ol0KITZvSLAdV
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: c3bcf6b3-995d-48d7-4a0d-08d5958d7d44
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY4PR09MB2279;
x-ms-traffictypediagnostic: CY4PR09MB2279:
x-microsoft-antispam-prvs: <CY4PR09MB22797487C010354B8806A38CB9A20@CY4PR09MB2279.namprd09.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(192374486261705)(95692535739014);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR09MB2279; BCL:0; PCL:0; RULEID:; SRVR:CY4PR09MB2279;
x-forefront-prvs: 0626C21B10
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(39850400004)(376002)(396003)(377424004)(252514010)(189003)(199004)(99286004)(6506007)(81156014)(5660300001)(11346002)(1720100001)(102836004)(76176011)(59450400001)(7696005)(8676002)(74316002)(446003)(2900100001)(8936002)(305945005)(186003)(97736004)(33656002)(53546011)(486005)(106356001)(105586002)(26005)(486005)(2501003)(81166006)(7736002)(25786009)(966005)(5250100002)(2906002)(53936002)(6306002)(9686003)(110136005)(55016002)(3280700002)(68736007)(4326008)(478600001)(6436002)(93886005)(14454004)(6246003)(86362001)(66066001)(6116002)(476003)(3846002)(54906003)(229853002)(316002)(3660700001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR09MB2279; H:CY4PR09MB2278.namprd09.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
x-microsoft-antispam-message-info: 6wvq0OUcuPbnomPIiIvlky3yThDJhzRAz9Q2xFwdhgNf7sN8FLn8q4CJxwFbxk+c41UH/sC0F9rJBSVBM1pG2tuzOs3y5BDM0KUP01uoZ2Rerx32RI1Rg7eyzGoxY/X0/s8El/PfKeGRO79otpaAIzf0A6/BNnnlUI0tAF1iufMpg9FO1DGwGgej73BpsXP0OkJXL0T7nkp+QEwl/A9nzs9I+WHiKJTP7KCVupmKx/eyse8c2yxtva5l8hjt9uhR9nlMuUDp5TE5/tUBjrWM51bAMOC8Tp3V38rSOV7FcqH92VA6CsO/GweKRuu91WQJT4nZNUC3nYoWcm/Drlvvdw==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: aero.org
X-MS-Exchange-CrossTenant-Network-Message-Id: c3bcf6b3-995d-48d7-4a0d-08d5958d7d44
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2018 15:55:26.5941 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: c8294700-c5a4-4ca1-a876-1457d39899fd
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR09MB2279
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/Gxh_KrZNL0lYX53ahPgSCbLKebg>
Subject: Re: [tcpm] [Technical Errata Reported] RFC5926 (5267)
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Mar 2018 15:55:41 -0000

Do you need to specify the character encoding (something like utf-8 encoding of unicode or ASCII) to guarantee that the string is 6 octets?

--
Ted Faber <theodore.v.faber@aero.org>
Senior Engineering Specialist
Computer Systems Research Department
The Aerospace Corporation
310-336-7373


________________________________________
From: tcpm <tcpm-bounces@ietf.org> on behalf of touch@strayalpha.com <touch@strayalpha.com>
Sent: Thursday, March 29, 2018 08:46
To: Brian Weis (bew)
Cc: tcpm@ietf.org; ekr@rtfm.com; tuexen@fh-muenster.de; ietf@kuehlewind.net; RFC Editor
Subject: Re: [tcpm] [Technical Errata Reported] RFC5926 (5267)

On 2018-03-28 15:42, Brian Weis (bew) wrote:
> Hi Joe,
>
> Sorry, I missed your reply to this before the errata was rejected.
>
>> On Feb 28, 2018, at 6:56 AM, Joe Touch <touch@strayalpha.com> wrote:
>>
>>
>> Hi, all,
>>
>> This errata should be rejected.
>>
>> NIST-SP800-108 does not require the use of 0x00 (see cited text
>> below). It only requires that the length and order of each field be
>> defined unambiguously.
>
>  This is correct. The issue is whether all TCP-AO implementations
> implementing NIST SP800-108 all add the 0x00 or not. If there is
> confusion between implementations then they will not generate the same
> session keys.

We use a fixed string ("TCP-AO"), not a variable one. As a result, we
don't need a flag to indicate the length of the string, and the flag
0x00 is only one way to do such an indication (vs. a second length field
or other flag value). Page 11 footnote of the NIST spec explains this.

>
>> The length of “TCP-AO” is clearly and unambiguously 6 octets, as
>> defined in the existing RFC text. The method of providing that
>> length unambiguously to the KDF algorithm is an implementation
>> issue.
>
>  I disagree that it is unambiguously 6 octets.  The use of
> double-quotes is often construed as a null-terminated string.

strlen("TCP-AO") = 6.

The null is a C encoding. Other languages use other ways to indicate the
length of the string.


> This can
> be read as a null-terminated 7 octet string.

That actually cannot be expressed in C. Strings in C cannot have
internal nulls; they would be interpreted as terminators.

> In fact, this is the
> exact question asked by an implementor, and why I filed the errata. I
> believe it is a reasonable request to clarify this one way or the
> other.

Neither Mirja nor I read the NIST spec that way. C strlen agrees with us
too.

I really think the implementer is getting wrapped around implementation
details, which are both language and implementation specific and don't
need to be in the spec IMO.

Joe


>
> If you agree with this, I’ll open another errata indicating the
> problem more clearly.
>
> My preference for clarifying that it does include the 0x00 is for
> safety. While the current RFC has only one label field (“TCP-AO”),
> if another string _beginning_ with ‘TCP-AO’ were also defined then
> there could be confusion between the two generated keys. Since the
> cost of adding 0x00 to the calculation is negligible, it seems prudent
> to  be safe.
>
> Thanks,
> Brian
>
>> Joe
>>
>> The following text is clear that 0x00 is optional:
>>
>>> 12) 0x00 – An all zero octet. An optional data field used to
>>> indicate a separation of different variable length data fields1.
>>>
>>> 1 This indicator may be considered as a part of the encoding
>>> method for the input data and can be replaced by other indicators,
>>> for example, an indicator to represent the length of the variable
>>> length field. If, for a specific KDF, only data fields with
>>> identical length are used, then the indicator may be omitted.
>>
>> and later, 0x00 is given as a choice used in the example presented,
>> not as a requirement:
>>
>>> The length for each data field and an order shall be defined
>>> unambiguously. For example, the length and the order may be
>>> defined as a part of a KDF specification or by the protocol where
>>> the KDF is used. In each of the following sections, a specific
>>> order for the feedback value, the counter, the Label, the
>>> separation indicator 0x00, the Context, and [L]2 is used, assuming
>>> that each of them is represented with a specific length. This
>>> Recommendation specifies several families of KDFs. Alternative
>>> orders for the input data fields may be used for different KDFs.
>>
>> ---------------------
>>
>>> On Feb 26, 2018, at 11:02 AM, RFC Errata System
>>> <rfc-editor@rfc-editor.org> wrote:
>>>
>>> The following errata report has been submitted for RFC5926,
>>> "Cryptographic Algorithms for the TCP Authentication Option
>>> (TCP-AO)".
>>>
>>> --------------------------------------
>>> You may review the report below and at:
>>> http://www.rfc-editor.org/errata/eid5267
>>>
>>> --------------------------------------
>>> Type: Technical
>>> Reported by: Brian Weis <bew@cisco.com>
>>>
>>> Section: 3.1.1
>>>
>>> Original Text
>>> -------------
>>> - Label:     A binary string that clearly identifies the purpose
>>> of this KDF's derived keying material.  For
>>> TCP-AO,
>>> we use the ASCII string "TCP-AO", where the last
>>> character is the capital letter "O", not to be
>>> confused with a zero.  While this may seem like
>>> overkill in this specification since TCP-AO only
>>> describes one call to the KDF, it is included in
>>> order to comply with FIPS 140 certifications.
>>>
>>> Corrected Text
>>> --------------
>>> - Label:     A binary string that clearly identifies the purpose
>>> of this KDF's derived keying material.  For
>>> TCP-AO,
>>> we use the ASCII string "TCP-AO", where the last
>>> character is the capital letter "O", not to be
>>> confused with a zero. The ASCII string is
>>> terminated
>>> with a null octet (0x00). While this may seem
>>> like
>>> overkill in this specification since TCP-AO only
>>> describes one call to the KDF, it is included in
>>> order to comply with FIPS 140 certifications.
>>>
>>> Notes
>>> -----
>>> This section states that "Both of these KDFs are based on the
>>> iteration-mode KDFs specified in [NIST-SP800-108].", which is
>>> later clarified to be the "counter mode" KDF defined in that
>>> document. The definition of the "Label" input to the KDF in the
>>> original text is not clear.
>>>
>>> [NIST-SP800-108] specifies that a 0x00 octet should follow the
>>> Label. This 0x00 octet is important when the KDF does not have
>>> control over the Context given it, which is the case here -- RFC
>>> 5926 depends on the definition in RFC 5925. RFC 5925 currently
>>> declares two fixed-size inputs for the Context (See Figures 7 & 8
>>> of RFC 5925), so the Context length differs. Also, RFC 5925 RFC
>>> could be updated over over time to include other Contexts that are
>>> variable sized. The risk of excluding 0x00 is enabling an attacker
>>> to choose a specially-crafted Context that violates the clean
>>> separation between the Label and Context arguments. Therefore, it
>>> is important to include the 0x00 octet for TCP-AO.
>>
>>> I believe this 0x00 is implied in the specification of the string
>>> "TCP-AO", since conventionally many string definitions include a
>>> trailing 0x00 octet, The text should state that the 0x00 octet is
>>> present as part of the string.
>>>
>>> If this errata does not result in adding the 0x00 octet, then its
>>> omission needs to be justified.
>>>
>>> Instructions:
>>> -------------
>>> This erratum is currently posted as "Reported". If necessary,
>>> please
>>> use "Reply All" to discuss whether it should be verified or
>>> rejected. When a decision is reached, the verifying party
>>> can log in to change the status and edit the report, if necessary.
>>>
>>>
>>> --------------------------------------
>>> RFC5926 (draft-ietf-tcpm-tcp-ao-crypto-03)
>>> --------------------------------------
>>> Title               : Cryptographic Algorithms for the TCP
>>> Authentication Option (TCP-AO)
>>> Publication Date    : June 2010
>>> Author(s)           : G. Lebovitz, E. Rescorla
>>> Category            : PROPOSED STANDARD
>>> Source              : TCP Maintenance and Minor Extensions
>>> Area                : Transport
>>> Stream              : IETF
>>> Verifying Party     : IESG
>>>
>>> _______________________________________________
>>> tcpm mailing list
>>> tcpm@ietf.org
>>> https://www.ietf.org/mailman/listinfo/tcpm
>>
>> _______________________________________________
>> tcpm mailing list
>> tcpm@ietf.org
>> https://www.ietf.org/mailman/listinfo/tcpm
>
> --
> Brian Weis
> Security, CSG, Cisco Systems
> Telephone: +1 408 526 4796
> Email: bew@cisco.com

_______________________________________________
tcpm mailing list
tcpm@ietf.org
https://www.ietf.org/mailman/listinfo/tcpm