Re: [secdir] secdir review of draft-ietf-json-text-sequence-11

Carl Wallace <carl@redhoundsoftware.com> Thu, 18 December 2014 12:12 UTC

Return-Path: <carl@redhoundsoftware.com>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 559FF1A883B for <secdir@ietfa.amsl.com>; Thu, 18 Dec 2014 04:12:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 U-UZRHa_DuLu for <secdir@ietfa.amsl.com>; Thu, 18 Dec 2014 04:12:40 -0800 (PST)
Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 708C71A888B for <secdir@ietf.org>; Thu, 18 Dec 2014 04:12:40 -0800 (PST)
Received: by mail-qc0-f171.google.com with SMTP id r5so729256qcx.30 for <secdir@ietf.org>; Thu, 18 Dec 2014 04:12:39 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:date:subject:from:to:cc:message-id :thread-topic:references:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=2/6MHDUmDfuPOxXZHoskLiG7VZUgnvgmVEq5jULxeDw=; b=ZLKZlsAq7pVEpnjoYRNITckEWe2oC8AnV8pxwxGJwaITKdrcdbifnzDnKEJ79chz1V uvuB1HAjUIUM9eDQu4DSvzfj+RmFLemgBxuBtKTfIVAVuJJdRhQ21LwYGnAHZ0osoNDq ABb7ZJbAYStls2JWmMpbPTv8HqMgoL+nCJaUlsL33e/WM8xHHCFhwLbb4oVFFRHDJ9iw tUKu5ytY1Ii984Fl6XZ78HMTXFcmHDUwOmjYncKbdhu0tx5hxSrAyfNyuCyhmoTArxS3 WX20aoLY4UmuxqJ3N3KyUwkjBO2edIwnqRUViwgCZOrEAn06jh2gb3aqBfF7PDsb0ZcZ t70A==
X-Gm-Message-State: ALoCoQlzKBfNL72BFKNUe0qhw9w0zzOTrU9J6HNzPB1UOTqoQ+npYavlRuf7q4s10GIKpiLQr5Cg
X-Received: by 10.229.61.5 with SMTP id r5mr2902970qch.28.1418904759522; Thu, 18 Dec 2014 04:12:39 -0800 (PST)
Received: from [192.168.2.39] (pool-173-79-132-199.washdc.fios.verizon.net. [173.79.132.199]) by mx.google.com with ESMTPSA id k11sm6591031qgf.18.2014.12.18.04.12.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 18 Dec 2014 04:12:39 -0800 (PST)
User-Agent: Microsoft-MacOutlook/14.4.3.140616
Date: Thu, 18 Dec 2014 07:12:34 -0500
From: Carl Wallace <carl@redhoundsoftware.com>
To: Nico Williams <nico@cryptonector.com>
Message-ID: <D0B82B77.29907%carl@redhoundsoftware.com>
Thread-Topic: [secdir] secdir review of draft-ietf-json-text-sequence-11
References: <D0B587AB.2948E%carl@redhoundsoftware.com> <20141216163238.GT3241@localhost> <D0B5C964.2954A%carl@redhoundsoftware.com> <20141216174829.GZ3241@localhost> <D0B5DC2E.295DB%carl@redhoundsoftware.com> <20141216193707.GE3241@localhost> <D0B5F9D2.29691%carl@redhoundsoftware.com> <20141216213533.GI3241@localhost> <D0B64568.29705%carl@redhoundsoftware.com> <20141217185523.GA3241@localhost> <20141217234113.GH9443@localhost>
In-Reply-To: <20141217234113.GH9443@localhost>
Mime-version: 1.0
Content-type: text/plain; charset="UTF-8"
Content-transfer-encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/secdir/1vqQp30PuzBe3NwR90U-wZi_PqQ
Cc: draft-ietf-json-text-sequence@tools.ietf.org, iesg@ietf.org, secdir@ietf.org
Subject: Re: [secdir] secdir review of draft-ietf-json-text-sequence-11
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2014 12:12:42 -0000


On 12/17/14, 6:41 PM, "Nico Williams" <nico@cryptonector.com> wrote:

>On Wed, Dec 17, 2014 at 12:55:23PM -0600, Nico Williams wrote:
>> On Tue, Dec 16, 2014 at 09:13:55PM -0500, Carl Wallace wrote:
>> >                                          [...]. I still think the
>>solution
>> > is to remove the delimiters added by the JSON text sequence encoder
>>in the
>> > JSON text sequence decoder.  This seems cleaner to me.  It would
>>probably
>> > require the encoder to reject inputs that have not been properly
>> > terminated or perhaps have a flag to auto-add <ws> to
>>non-self-delimited
>> > top level values before adding the <LF> where such is safe to do.
>> 
>> Tolerating a missing LF seems like a fine thing to do if the top-level
>> value was nonetheless valid and delimited.
>> 
>> On the other hand it adds some ambiguity if some sequence parser
>> implementations can tolerate it and others can't.

The suggestion is not to tolerate a missing <LF> but to not always add
them in the text sequence encoder in the first place. The <LF> addition
would essentially be an extension of the JSON text encoder (albeit
implemented in the text sequence encoder).  There would be no ambiguity.
The parser would always leave it in. Where integrity mechanisms are used,
the auto-<LF> would need to be turned off and the source responsible for
properly terminating inputs to the text sequence encoder.

>
>I continue to think that the best thing to do is have a recommendation
>as to how to handle ambiguities, and point them out.
>
>Therefore I don't think we should say that the parser MUST strip the
>trailing LF, but SHOULD (or MAY not strip it) would be fine, and should
>address the concern about alterations to JSON texts that can then affect
>cryptographic integrity protection.

Thinking more about stripping out the <LF>, that won’t always work either
for the same reason you have the parser reject non-self-delimited texts
that do not end with a <LF>. The text sequence encoder could terminate
before the <LF> is written possibly leaving a <LF> added by the source
exposed (and removed by a decoder). The parser really can’t know if the
JSON encoder or JSON text sequence encoder added a trailing <LF>.