Re: [Doh] draft-ietf-doh-dns-over-https-04 feedback

Thomas Peterson <hidinginthebbc@gmail.com> Thu, 22 March 2018 10:20 UTC

Return-Path: <hidinginthebbc@gmail.com>
X-Original-To: doh@ietfa.amsl.com
Delivered-To: doh@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6FAE71200C5 for <doh@ietfa.amsl.com>; Thu, 22 Mar 2018 03:20:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 T2eB7IGghwqs for <doh@ietfa.amsl.com>; Thu, 22 Mar 2018 03:19:59 -0700 (PDT)
Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (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 50867126C89 for <doh@ietf.org>; Thu, 22 Mar 2018 03:19:59 -0700 (PDT)
Received: by mail-wr0-x22b.google.com with SMTP id d10so8081333wrf.3 for <doh@ietf.org>; Thu, 22 Mar 2018 03:19:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5qXlp1NBaFy2MUAN8R8lplc/MU6gS3xmZgSp3Je/SRA=; b=Kc/Q4EEETUWPRpYvTrMHrlMVthXYKklv/xPO273grPyn6fxZJRxu8iMmUBLUI6QK/t Z3M0zMG/3tb1txApf/jqyC+FD5R4kuoU5GfWK/X/iOZIADs2vLzKPuytlr40bwdxBuXs Rf9tnVaB8pLvdQ5SlcKBxjXEZnBfPJBQNOjcqVNuPRfAPiZRZQ5KXSP1IHdtQV9OpSQE vo+LX0GWApPTwR90EeRuGn0LGjpnsRAwMHXrxz06jNS5Bxt7Pu7WIIxHT1BkfDGmlw16 ywRidqW7jH3BFGBzscXONWyqySWZU0/XOncrdQVFbl9I6c3Dwd3oj2QK7b9lrpAIb58L PWfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=5qXlp1NBaFy2MUAN8R8lplc/MU6gS3xmZgSp3Je/SRA=; b=e7R5qSZquWKaMOM1c6OT2Xso2JtC2BOHQsS194bGMBmV2yJAXmv6iB5WH4HF0jfyoa 3bDh+UiKyO8UzLuov57alR0YWWnysJfundJLyu2JUvoR9Cqpgkypd+pWz47HpF1prOY6 oVSGLdr2eGdJrJeEy4vacF8yf867nIiHilawQ/8VI14fd2PG93BR5whzxGdA/NPJhsk9 7GzAmdg0AnTwt3be5Vy7KvyeSVyOdq54o22RQy/b/X1uofxEQ2Lk5BARZkanXDOBNlj4 PZ/kZAynpJK1LesTs4Ig60xGVvaRcE+IQ/P+X16NA147MoS+XEQkAt21KxvUDuecASd3 ogcg==
X-Gm-Message-State: AElRT7ECXrn/qOXGlPyX9BL5TAlPQJbgvxN+1/Qj+N33K+3k+sFWSTy7 1F/AR3h7FvMdnv6JZJZdjQRugg==
X-Google-Smtp-Source: AG47ELvmwKeNCZ5RWWc5HEtFXZPOo/b9o4xcGUSnedPQwRUcu7E09svqvzj82hN1R3GUR8E8oyvyjw==
X-Received: by 10.223.176.253 with SMTP id j58mr19180310wra.269.1521713997866; Thu, 22 Mar 2018 03:19:57 -0700 (PDT)
Received: from raspberrypi ([2a02:c7f:629:a400:350:885e:dce0:c58d]) by smtp.gmail.com with ESMTPSA id z9sm8561041wrz.4.2018.03.22.03.19.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 03:19:57 -0700 (PDT)
Date: Thu, 22 Mar 2018 10:19:53 +0000
From: Thomas Peterson <hidinginthebbc@gmail.com>
To: Ray Bellis <ray@bellis.me.uk>
Cc: doh@ietf.org
Message-ID: <20180322101953.GA20977@raspberrypi>
References: <96afa3b5-2925-8276-9374-082b491f4216@bellis.me.uk> <7b6ee873-9d46-2795-4401-72485fcd97b6@bellis.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <7b6ee873-9d46-2795-4401-72485fcd97b6@bellis.me.uk>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/G0Yeu5NNPycL1RDoV0uBDZVKM20>
Subject: Re: [Doh] draft-ietf-doh-dns-over-https-04 feedback
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: DNS Over HTTPS <doh.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/doh>, <mailto:doh-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/doh/>
List-Post: <mailto:doh@ietf.org>
List-Help: <mailto:doh-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/doh>, <mailto:doh-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Mar 2018 10:20:03 -0000

The alternative to base64url encoding is URI encoding a base64 payload, a two
step operation. A naïve parser in Javascript without needing anotherlibrary
could be done in as little as[1]:

    atob(data.replace(/_/g, '/').replace(/-/g, '+'))

Regards

[1] https://stackoverflow.com/a/44528376

On Thu, Mar 22, 2018 at 10:07:41AM +0000, Ray Bellis wrote:
> I forgot one:
> 
> Why require base64url instead of plain base64?  The latter is natively
> supported in web applications via the `window.btoa` and `.atob` functions.
> 
> Ray
> 
> _______________________________________________
> Doh mailing list
> Doh@ietf.org
> https://www.ietf.org/mailman/listinfo/doh