Re: [tcpm] SYN/ACK Payloads, draft 01

"Adam Langley" <agl@imperialviolet.org> Thu, 14 August 2008 16:40 UTC

Return-Path: <tcpm-bounces@ietf.org>
X-Original-To: tcpm-archive@megatron.ietf.org
Delivered-To: ietfarch-tcpm-archive@core3.amsl.com
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6A3423A6DB7; Thu, 14 Aug 2008 09:40:44 -0700 (PDT)
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 581883A6D53 for <tcpm@core3.amsl.com>; Thu, 14 Aug 2008 09:40:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.435
X-Spam-Level:
X-Spam-Status: No, score=0.435 tagged_above=-999 required=5 tests=[AWL=-1.576, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, FRT_STOCK2=3.988]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PQJrTcCSFxbx for <tcpm@core3.amsl.com>; Thu, 14 Aug 2008 09:40:42 -0700 (PDT)
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by core3.amsl.com (Postfix) with ESMTP id 1452D3A6D17 for <tcpm@ietf.org>; Thu, 14 Aug 2008 09:40:42 -0700 (PDT)
Received: by rv-out-0506.google.com with SMTP id b25so439071rvf.49 for <tcpm@ietf.org>; Thu, 14 Aug 2008 09:40:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=dAIYDTmstaw4vOKQj+YMugsZb7iJUSzl5dlyXVQTy9w=; b=b5QqDEEQdu7vIw/OxxMsYTT0YHikrmuSrxLOWbBqeznlqw/JPYV7tzr6tWbwCP2c6/ vaXVxUZo2PIw/G44xU6EjfesoBmIHaR7BxoVB25Vb39ynE4FS/L1sgr97y9X86OmkytD MpwzJQbFEW486REoKyx6VV7ICAd/vA0v6jXWs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Q5HrL+KvYm9asC1+YfMqm+hvP6kJCjN12OxBIySlxO2L0SCqS6j4zvXKx4oZmXsdOQ Xmn7Np837qQIrkHxGMwmgYzUZj7xK3jhecx2q/EjENt1uSmLz2r/2SQs2Xo42eJUt8Ha bju6v8eDeN9KU40X29SMdp0r0v0GcId3mt7ss=
Received: by 10.141.142.15 with SMTP id u15mr824701rvn.171.1218732046273; Thu, 14 Aug 2008 09:40:46 -0700 (PDT)
Received: by 10.141.37.3 with HTTP; Thu, 14 Aug 2008 09:40:46 -0700 (PDT)
Message-ID: <396556a20808140940p63dec2d2ib3332b27da8260ae@mail.gmail.com>
Date: Thu, 14 Aug 2008 09:40:46 -0700
From: "Adam Langley" <agl@imperialviolet.org>
To: "Joe Touch" <touch@isi.edu>
In-Reply-To: <48A3C0B3.8050003@isi.edu>
MIME-Version: 1.0
Content-Disposition: inline
References: <396556a20808111035s2b974233o1e9d3671e82e3350@mail.gmail.com> <20080813195027.C4C5B50848@romeo.rtfm.com> <396556a20808131307r65a9f6a0oe4365be029620b2c@mail.gmail.com> <48A35CFA.4060709@isi.edu> <396556a20808131525i20dabf06w7a7a11e3468e541a@mail.gmail.com> <48A36104.6000000@isi.edu> <396556a20808131605w2ccac3ceo21160401e4545c15@mail.gmail.com> <48A383F0.9030601@isi.edu> <396556a20808131827x1ab32b13yaa9358ac1a70c6ed@mail.gmail.com> <48A3C0B3.8050003@isi.edu>
X-Google-Sender-Auth: 00862bc176bbbe3b
Cc: tcpm@ietf.org
Subject: Re: [tcpm] SYN/ACK Payloads, draft 01
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://www.ietf.org/mailman/private/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tcpm-bounces@ietf.org
Errors-To: tcpm-bounces@ietf.org

On Wed, Aug 13, 2008 at 10:20 PM, Joe Touch <touch@isi.edu> wrote:
> I'm confused now; your code - and your note. Let's go back to the key issue:
>
>        - is the data received by the client dependent on the option?

I do apologise, the confusion is my fault:

There are two extensions interacting here. Firstly, there's an
extension to include data in the SYNACK. Then there's the application
layer signaling with the option. I was outlining the code for the
latter. The former is an extension that could be deployed today, it's
managed with a setsockopt on the server socket:

struct tcpsa tcpsa;
memcpy(tcpsa.tcpsa_payload, mysynackdata, length);
setsockopt(socket, SOL_TCP, TCP_SADATA, &tcpsa, sizeof(tcpsa));

listen(socket);

for (;;) { accept(); ... }

Obviously, this is just an implementation detail. It's nice for
sockets based APIs to do it like this. Since such stacks are dominant,
the idea of a constant payload appears in the draft. I make a couple
of exceptions to this. The ability to include a 64-bit nonce is very
useful and easy for the stack to manage. That's done with:

struct tcpsa tcpsa;
memcpy(tcpsa.tcpsa_payload, mysynackdata, length);
tcpsa.tcpsa_flags = TCP_SADATA_INC_NONCE;
tcpsa.tcpsa_nonce_offset = 0;
setsockopt(socket, SOL_TCP, TCP_SADATA, &tcpsa, sizeof(tcpsa));

Also, the ability to only send this data when the SYN includes the
SAPP option. At the moment, this is the default, although there is
space in the flags set aside for when I get round to it.

Example client side code and stack patches are referenced below.

Again, this is just to appease the sockets API. Stacks like [1] allow
the application to process the SYN directly and construct any SYNACK
payload they like on a per-packet basis.

[1] http://tservice.net.ru/~s0mbre/old/?section=projects&item=unetstack

> As a final question, if this is experimental, why not just use the
> experimental TCP option KIND?
>
> (and how much of this has been implemented, traced, and checked for
> things like simultaneous open - I don't recall if you noted that before)

A linux patch[2] has been reviewed by the networking maintainer,
although I haven't asked for it to be applied yet because it's not
quite final. (It's using an experimental KIND number for one). Example
client side code example can be found at [3]. This includes preload
code to support Apache, Firefox etc (screenshot: [4]). It's been
tested by several people over the real Internet. (Note that [3] is
just a dump of my current code, it has many rough edges at the moment.
And ignore the TCP-AO stuff therein, it's #ifdef'ed out).

Also, I believe that I currently have the Diffie-Hellman speed record
with [5] since my implementation is 10% faster than the previously
claimed best[6]. (The version in [3] is much slower, I've yet to
update it.)

I'm am currently using an experimental KIND. However, if I were to,
say, deploy this on all the Google frontend servers (hypothetically,
of course), I suspect that would be in excess of what the experimental
kinds were for.

As for simultaneous open. The linux patch handles it by not doing
anything different. The option may be carried in the SYN, but the ACKs
are as normal. Since all BSD like stacks would, very likely, work the
same, it might be best to specify that behaviour in the draft.


Cheers


AGL

[2] http://marc.info/?l=linux-netdev&m=121857466907992&w=2
[3] http://www.imperialviolet.org/binary/libobstcp-0.2a.tar.bz2
[4] http://bp3.blogger.com/_kRcqvZJgJFs/SH0B_oPSlzI/AAAAAAAAAUM/eg-IxgbyhIs/s1600-h/firefox-obstcp.png
[5] http://code.google.com/p/curve25519-donna
[6] http://cr.yp.to/ecdh/reports.html


-- 
Adam Langley agl@imperialviolet.org http://www.imperialviolet.org
_______________________________________________
tcpm mailing list
tcpm@ietf.org
https://www.ietf.org/mailman/listinfo/tcpm