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

John Cowan <> Sat, 11 March 2017 02:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5C54B129531 for <>; Fri, 10 Mar 2017 18:09:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.898
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id pnben3yxtWEV for <>; Fri, 10 Mar 2017 18:09:04 -0800 (PST)
Received: from ( [IPv6:2a00:1450:400c:c0c::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id DC31C129538 for <>; Fri, 10 Mar 2017 18:08:57 -0800 (PST)
Received: by with SMTP id g10so74736854wrg.2 for <>; Fri, 10 Mar 2017 18:08:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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 with SMTP id w81mr20250782wrb.151.1489198136300; Fri, 10 Mar 2017 18:08:56 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Fri, 10 Mar 2017 18:08:35 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <>
From: John Cowan <>
Date: Fri, 10 Mar 2017 21:08:35 -0500
Message-ID: <>
To: Benjamin Kaduk <>
Content-Type: multipart/alternative; boundary=001a113c36a6ea2d48054a6af5a1
Archived-At: <>
Cc: Julian Reschke <>,,,, "" <>
Subject: Re: [secdir] [Json] secdir review of draft-ietf-jsonbis-rfc7159bis-03
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Security Area Directorate <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 11 Mar 2017 02:09:05 -0000

On Thu, Mar 9, 2017 at 12:53 AM, Benjamin Kaduk <> 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
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