Re: [secdir] [Json] secdir review of draft-ietf-jsonbis-rfc7159bis-03

John Cowan <cowan@ccil.org> Sat, 11 March 2017 02:09 UTC

Return-Path: <cowan@ccil.org>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C54B129531 for <secdir@ietfa.amsl.com>; Fri, 10 Mar 2017 18:09:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ccil-org.20150623.gappssmtp.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 pnben3yxtWEV for <secdir@ietfa.amsl.com>; Fri, 10 Mar 2017 18:09:04 -0800 (PST)
Received: from mail-wr0-x233.google.com (mail-wr0-x233.google.com [IPv6:2a00:1450:400c:c0c::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DC31C129538 for <secdir@ietf.org>; Fri, 10 Mar 2017 18:08:57 -0800 (PST)
Received: by mail-wr0-x233.google.com with SMTP id g10so74736854wrg.2 for <secdir@ietf.org>; Fri, 10 Mar 2017 18:08:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=09DcN8lr70VIKGmVSwBDfg4zFIJpN6+l9pPEM7I/2II=; b=AaNY1fO0w02ZlBqNKKJXurf6/N9ERh4CY8zf52eHGWar/akzNoxnYnPA7EIQDAXKLg IY7xNJyuUiXbRWmg6ZyTI5Z3WBiCP73RP0UvVHZmTDHpZV5S8sN2XiAvZv+cy0CR8m8V 7ZVozdONfvTr4Pr+TPx61LWk3/LkImM4DsPNsm1luehm2yfJAKh7ANBN58oqfSEVSYgA e5gbkL7tGLN3sm5LCGcsBhb94P5xewC8dwm9ktsioxADkFdBzG7rCpY5ZGlSBY0f9y+j alMowvOhGnLFoP9v5v5GQP25GSF1YyyGJ/oHqjVl7dt6WGRxIYRJZkUB28917imtsaNb hVbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=09DcN8lr70VIKGmVSwBDfg4zFIJpN6+l9pPEM7I/2II=; b=Cod1xsOBW+7PQ7C8amlApH8pEZNPVbAeOZdh83Ew7ajKafkXLnwyM4KPnAs1VRCI+f IW/08n+zq57al9u01B4UmfO6eBWM/4xUuOnicCFaOJR/jdX1YdsG4YwNC+yHXAYDrLGy jpeIefJ5tVxDdFZWY5j35rYK1FuFuE4L6hN3RSsyw1QtxkKBHfJxfjMkCankA3pyX2cv Gu6oReaKQ/xg3ZfAW25/YUTYkO/CyRiLb7G+UTGO5XPKN99ovhwVzchEScvKtqdozfvt U0++xSYtZBvByLs9+rNlH+BSsGembxii+oeAQp5YZN2T6x75b7tRSRty2KUIxbzQXoWz /S2w==
X-Gm-Message-State: AMke39lHvbSwDafOJ6SS7CJTXMBDXJBLZCxNA0h7Rgeata0xx9UjP/P9ND/dnbGwoTvr6Ig1HgqnV4U10t8SpyzM
X-Received: by 10.223.152.215 with SMTP id w81mr20250782wrb.151.1489198136300; Fri, 10 Mar 2017 18:08:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.28.181.14 with HTTP; Fri, 10 Mar 2017 18:08:35 -0800 (PST)
In-Reply-To: <20170309055348.GL30306@kduck.kaduk.org>
References: <20170308014823.GF30306@kduck.kaduk.org> <382aa5c8-c977-b24d-4d19-251257833b00@gmx.de> <456b4234-0d94-1033-507c-710878bb5159@gmx.de> <20170309055348.GL30306@kduck.kaduk.org>
From: John Cowan <cowan@ccil.org>
Date: Fri, 10 Mar 2017 21:08:35 -0500
Message-ID: <CAD2gp_TOxcZJxwPoMhq-xp6M+Yq+tQnMUv81YNFp-ydRMpH=5w@mail.gmail.com>
To: Benjamin Kaduk <kaduk@mit.edu>
Content-Type: multipart/alternative; boundary=001a113c36a6ea2d48054a6af5a1
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/iPsXrmWK6ISZUNJFHyrnQSsOSNo>
Cc: Julian Reschke <julian.reschke@gmx.de>, draft-ietf-jsonbis-rfc7159bis.all@ietf.org, secdir@ietf.org, ietf@ietf.org, "json@ietf.org" <json@ietf.org>
Subject: Re: [secdir] [Json] secdir review of draft-ietf-jsonbis-rfc7159bis-03
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Sat, 11 Mar 2017 02:09:05 -0000

On Thu, Mar 9, 2017 at 12:53 AM, Benjamin Kaduk <kaduk@mit.edu> wrote:

If that's what's supposed to happen, it should probably be more
> clear, yes.  (But aren't there texts that have valid interpretations
> in multiple encodings?)
>

Not if the content is well-formed JSON and the only possible encodings are
UTF-8, UTF-16, and UTF-32.  It suffices to examine the first four bytes of
the input.  If there are no NUL bytes in the first four bytes, it is UTF-8;
if there are two NUL bytes, it is UTF-16; if there are three NUL bytes, it
is UTF-32.  This works because the grammar requires the first character to
be in the ASCII repertoire, and the NUL *character* (U+0000) is not allowed
at all.

-- 
John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
I don't know half of you half as well as I should like, and I like less
than half of you half as well as you deserve.  --Bilbo