[TLS] Renegotiation and TLSNotary

Sergio Demian Lerner <sergio@coinspect.com> Wed, 25 March 2015 03:10 UTC

Return-Path: <sergio@coinspect.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 957A51ACD35 for <tls@ietfa.amsl.com>; Tue, 24 Mar 2015 20:10:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 0zRUDJKJfJjj for <tls@ietfa.amsl.com>; Tue, 24 Mar 2015 20:10:00 -0700 (PDT)
Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) (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 E4B251ACD33 for <tls@ietf.org>; Tue, 24 Mar 2015 20:09:59 -0700 (PDT)
Received: by lbbug6 with SMTP id ug6so8230490lbb.3 for <tls@ietf.org>; Tue, 24 Mar 2015 20:09:58 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=YCpi8Seys4w+ziWiwNQuoYeOSPaLrMVEXASPHAORfkQ=; b=nH81T+oymS0nbnBFwoN/Tdr3VUYG09ctvs+qisKSFKqcriK78QjN2wlxusiIGeGVvl x75pqJvxftK7xZXjzDpf9c8BgQfUzJ7qGZXkTsjsQaJyp0HH8o2/XHXCviUrWVsvpL1L 3ZAtRsSIZKcDqFoa75VkPVeaR8jlxOVJJicuUL7cnDEDsLJJaDlWE8v6aLFJrGNYfR2a 6uAe4gQ+PcGaHbwlqx1Dfi+aBsjVNy+r7DdMIhAzlJhLMpPYvg1QnpBDjGDCW86x6Hxg onYOyekCCX5aHSbnHyGLNpZMfl7XnK7SLODWDSXd+AEHKiQ9fEZISyhIw4RfN5gliv3t RrBw==
X-Gm-Message-State: ALoCoQlQdSdSTWqPtdOHgPYzhRd9OpJ/nIb6NfzMtUU3i2D11O2f2RsTqFbK8z3VDW8654kfpBrD
MIME-Version: 1.0
X-Received: by 10.112.89.71 with SMTP id bm7mr6545047lbb.20.1427252998295; Tue, 24 Mar 2015 20:09:58 -0700 (PDT)
Received: by 10.25.143.4 with HTTP; Tue, 24 Mar 2015 20:09:58 -0700 (PDT)
X-Originating-IP: [190.247.34.93]
Date: Wed, 25 Mar 2015 00:09:58 -0300
Message-ID: <CAEoH-p4F006Uu8Xr=+V08DMAA5_yo2v8_6x-u6Yd+OMmh=_ytg@mail.gmail.com>
From: Sergio Demian Lerner <sergio@coinspect.com>
To: tls@ietf.org
Content-Type: multipart/alternative; boundary="001a11c36d74f7e9ad0512143b6b"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/8ZK37bSWPvHf0p0X9nFzVAoT-04>
Subject: [TLS] Renegotiation and TLSNotary
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Mar 2015 03:14:01 -0000

Hi,
This is my first post to this mailing list and I if I break some
prestablished rule, I apologize in advance.

One of our clients requires the notarization of TLS sessions. One
interesting application I found is the TLSNotary project, but it only
partially solves this problem: is only allows auditing a single stream
direction, is is not compatible with TLS 1.2 nor 1.3 and it lowers
considerably the protocol security. Of course he wants transparent
notarization for eavy website, not a higher-level protocol provided by a
website on purpose, and this is completely logical and coherent with the
attributes of a notary.

I would be interesting if TLS 1.3 could allow optional and easy
notarization of the streams. TLS 1.3 has eliminated renegotiation, which
may be a bulding block for notarization, so I hope in incorporates another
way of providing that functionality.

For example: if every MAC computed included the the MAC digest of each
previous message sent in that stream, then a single signature of the last
MAC would be enought to validate one of the streams. Or in AEAD
terminology, every packet payload additional_data would include the
authentication tag of the previous packet.

If key renegocitation is allowed, then a renegotiation done by a third
party after a protocol interaction would be enought to notariaze all
previous interactions.

To get a join notarization of both streams, TLS in notarization could add a
new message GetMAC that should be responded with the message SendMAC,
containing the sequence number and MAC of the the last packet decrypted in
the other stream (client->server). Since the MAC on one stream would
contain the previous packet MAC digest, then the MAC sent with sendMAC
would provide a MAC validating both streams (client->server and
servcer->client)

A full communication would be

      Client                                               Server

      ClientHello                  -------->
      (client specifies a NOTARY extension somehow)        ServerHello
      .....
      [ChangeCipherSpec]
      Finished                     -------->
                                               [ChangeCipherSpec]
                                   <--------             Finished
      Application Data             <------->     Application Data

      Now the client gives the notary the control of the streams.

      The server does a renegotiation to obtain a signature of the

      previuously sent data.

      Notary tunneled over Client                     Server

      ClientHello                  -------->
                                                      ServerHello
      .....
      [ChangeCipherSpec]
      Finished                     -------->
                                               [ChangeCipherSpec]
                                   <--------             Finished
      Application Data             <------->     Application Data

      getMAC                       -------->

                                   <--------     sendMAC


This "notarization" can only convince the notary of the encrypted
information exchange, but cannot convince a third party. Also it gives the
notary some control over the streams. So better than this would be that
instead of getMAC/sendMAC there can be two messages
getSignature/SendSignature that send a digitally signed MAC using a
server's pubkey, instead of only the MAC.

Another option is that in notarization mode, each MAC sent would include
the nseq and the MAC of the last packets received/sent of both streams.
Then an exact reproduction of the message interaction would be available
for notarization, but the seq_num of the opposed stream would need to be
transmitted in the header or encrypted in the payload (it cannot be part of
the additional_data because it is not known to the client, because of the
delay of the network)

In AEAD terminology the first idea would be done by modifying the
additional_data:

 additional_data = seq_num +* prev_authentication_tag* +
                    TLSPlaintext.type +
                        TLSPlaintext.version

while the second would be:


 additional_data = seq_num +
*prev_authentication_tag +
opposite_stream_prev_authentication_tag* +
                    TLSPlaintext.type +
                        TLSPlaintext.version

Again, this would be an optional mode, orthogonal with ciphersuite chosen,
extensions, etc.

I hope you find this extension as usefull as we do.  Last, we have several
use cases for key renegotiation, and it's a pity it will be excluded from
TLS 1.3. I will present my arguments in another e-mail.

Best regards,

-- 
Sergio D. Lerner
Cryptocurrency Security Auditor
Coinspect.com