Re: The TCP and UDP checksum algorithm may soon need updating

Nico Williams <nico@cryptonector.com> Tue, 09 June 2020 19:39 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1B8903A0D3D for <ietf@ietfa.amsl.com>; Tue, 9 Jun 2020 12:39:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cryptonector.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 a2MdPZ4EL8RX for <ietf@ietfa.amsl.com>; Tue, 9 Jun 2020 12:39:44 -0700 (PDT)
Received: from brown.elm.relay.mailchannels.net (brown.elm.relay.mailchannels.net [23.83.212.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 909093A0D3B for <ietf@ietf.org>; Tue, 9 Jun 2020 12:39:44 -0700 (PDT)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 646C77E1AF6; Tue, 9 Jun 2020 19:39:43 +0000 (UTC)
Received: from pdx1-sub0-mail-a21.g.dreamhost.com (100-97-66-8.trex.outbound.svc.cluster.local [100.97.66.8]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C4EFC7E1BE4; Tue, 9 Jun 2020 19:39:42 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from pdx1-sub0-mail-a21.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.8); Tue, 09 Jun 2020 19:39:43 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Obese-Reign: 000c9ca601ce22cf_1591731583085_2391594187
X-MC-Loop-Signature: 1591731583084:2014962371
X-MC-Ingress-Time: 1591731583084
Received: from pdx1-sub0-mail-a21.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTP id 79E0A80E6F; Tue, 9 Jun 2020 12:39:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=79/w4HZ4qCSbX4 COjSvWxlFBv78=; b=JEkTq+nKU3pdiPN4EvkEBCf5rzGUfSUA0Wjkceae3+bhuV tTN1+i0ckvwjMiyWisfSRFmUqYoUNh4JYpqYEiOcFaB/Qe3JyoAqebPuyIuBL3wY MYMcJQoBlG+3aHx5UZv1lkwGAVoyhyH8vNpRvxI3KlpyZkr61/6Q8Kjdu1mUI=
Received: from localhost (unknown [24.28.108.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTPSA id AFAAC80E69; Tue, 9 Jun 2020 12:39:40 -0700 (PDT)
Date: Tue, 09 Jun 2020 14:39:34 -0500
X-DH-BACKEND: pdx1-sub0-mail-a21
From: Nico Williams <nico@cryptonector.com>
To: Craig Partridge <craig@tereschau.net>
Cc: IETF discussion list <ietf@ietf.org>
Subject: Re: The TCP and UDP checksum algorithm may soon need updating
Message-ID: <20200609193933.GC3100@localhost>
References: <CAHQj4CcRanB9c6_cEVcLgUNJBFMqXb_aH6eBBSaR0-_rQO5i9Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAHQj4CcRanB9c6_cEVcLgUNJBFMqXb_aH6eBBSaR0-_rQO5i9Q@mail.gmail.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudehgedgudegvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfhggtggujggfsehttdertddtredvnecuhfhrohhmpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqnecuggftrfgrthhtvghrnhepffdtkeethfeuteeviefgfeegjeetjedvhfehgfdvtdefueejheelgeeuhffghffgnecukfhppedvgedrvdekrddutdekrddukeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdpihhnvghtpedvgedrvdekrddutdekrddukeefpdhrvghtuhhrnhdqphgrthhhpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqpdhmrghilhhfrhhomhepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomhdpnhhrtghpthhtohepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomh
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/sQd4VEKxctzgySWJ_TA7Va0Ixoc>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Jun 2020 19:39:46 -0000

On Tue, Jun 09, 2020 at 01:31:58PM -0600, Craig Partridge wrote:
> Following up on notes from various folks, most notably John K. and
> Christian H., about checksums and encryption-based integrity protection, I
> wanted to make a couple of clarifying points.
> 
> * If you are not worried about an adversary who seeks to alter your data in
> transit, then integrity protection is a lousy method for ensuring the
> received data is correct.  The reality is that a checksum of width X bits
> can potentially catch 10x as many errors as an integrity check of X bits
> and will likely require 1/X computational power to compute.  The
> requirement to make an integrity check proof against an adversary makes it
> less good. [Happy to explain more -- just trying to keep this note short].

While this is true, application developers who are affected by weak TCP
checksums don't really have a better option, since TLS is basically all
they really have off the shelf, they will get a) [many] more bits of
MAC, b) therefore more protection than a 16-bit checksum could provide,
c) more compute cost.

> * Some folks have assumed the TCP checksum, at 16 bits, misses an error
> about 1 in 2^16 times.  That's not correct.  There are classes of errors
> that TCP catches 100% of the time (e.g. single-bit errors).  There are also
> classes of errors that the TCP checksum misses about 1 in 2^10 times.  This
> latter is because the TCP checksum is not terribly good -- a better
> designed checksum would miss only about 1 in 2^16.

2-bit errors do happen.

Nico
--