Re: [quicwg/base-drafts] First octet changes (#2006)

MikkelFJ <notifications@github.com> Thu, 15 November 2018 22:22 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E731F130E5F for <quic-issues@ietfa.amsl.com>; Thu, 15 Nov 2018 14:22:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.47
X-Spam-Level:
X-Spam-Status: No, score=-3.47 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 DAqfB2kYmqIx for <quic-issues@ietfa.amsl.com>; Thu, 15 Nov 2018 14:22:15 -0800 (PST)
Received: from o9.sgmail.github.com (o9.sgmail.github.com [167.89.101.2]) (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 746E9130E19 for <quic-issues@ietf.org>; Thu, 15 Nov 2018 14:22:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=5CmnBiqXie/ztQiH6XQqEY70wWY=; b=Ugn/PcY56C2+Y0gv qkur4+mJYATD5upQ2fYL0lh6E9OaUAGyuY1DznPuUO5S0XB3dLQ+VijciDBjY/Sw vxxm5u+NzV/maqVeoMCgrs0UvkbYzCzjZOFhnV5Kb9C58txza/qpeeOxkpdE0uYl Y5m8kaLObzcSPRxWJfcXVuUsss0=
Received: by filter0733p1las1.sendgrid.net with SMTP id filter0733p1las1-6602-5BEDF195-41 2018-11-15 22:22:14.040723976 +0000 UTC m=+709068.188792880
Received: from github-lowworker-e711880.cp1-iad.github.net (unknown [192.30.252.45]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id T7AOy6sGQ7Wo3iy3yyzhkw for <quic-issues@ietf.org>; Thu, 15 Nov 2018 22:22:13.758 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-e711880.cp1-iad.github.net (Postfix) with ESMTP id B60F0440789 for <quic-issues@ietf.org>; Thu, 15 Nov 2018 14:22:13 -0800 (PST)
Date: Thu, 15 Nov 2018 22:22:14 +0000
From: MikkelFJ <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abe2bddc1a96854b70e551d9327c4db456c241086692cf000000011805b39592a169ce16b57ba1@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2006/review/175584189@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2006@github.com>
References: <quicwg/base-drafts/pull/2006@github.com>
Subject: Re: [quicwg/base-drafts] First octet changes (#2006)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5bedf195b4776_6c1e3f85b9ed45bc16521f"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: mikkelfj
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak0bBfwx0UXPHb+QApOQpDR4+rWWCY7RDgySlp pl8r5XVqFUFtMF9BmL3nUiSTRY9qlCTzbSeBTh+DM3ZPwlMHs8Dpo+HflH6uuhhRPlx3COpX8nvVr/ AKu4TuvTg5DGq426t93J6+q8UHvr9sSqp6BpQm4pMNGcNWLtarEXo1rrUbMsfcSSakzB00r2hb528F A=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/C25my_otlvuPu6174u9-36uZmDs>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Nov 2018 22:22:17 -0000

mikkelfj commented on this pull request.



> +with the remaining bytes.
+
+{{pseudo-hp}} shows a sample algorithm for applying header protection. Removing
+protection only differs in the order in which the packet number length
+(pn_length) is determined.
+
+~~~
+mask = header_protection(hp_key, sample)
+
+pn_length = (packet[0] & 0x03) + 1
+if packet[0] & 0x80 == 0x80:
+   # Long header: 4 bits masked
+   packet[0] ^= mask[0] & 0x0f
+else:
+   # Short header: 5 bits masked
+   packet[0] ^= mask[0] & 0x1f

@DavidSchinazi The simplest way to randomize it is to encrypt it, but as Ian says, there are reasons not to do this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/2006#discussion_r234030414