Re: [TLS] Renegotiation and TLSNotary

Sergio Demian Lerner <sergio@coinspect.com> Sun, 29 March 2015 11:06 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 1DFDC1A6EE1 for <tls@ietfa.amsl.com>; Sun, 29 Mar 2015 04:06:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.723
X-Spam-Level:
X-Spam-Status: No, score=0.723 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_50=0.8, 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 bsnmek-uzHzL for <tls@ietfa.amsl.com>; Sun, 29 Mar 2015 04:06:50 -0700 (PDT)
Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) (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 F01201A3B9F for <tls@ietf.org>; Sun, 29 Mar 2015 04:06:49 -0700 (PDT)
Received: by labe2 with SMTP id e2so98659269lab.3 for <tls@ietf.org>; Sun, 29 Mar 2015 04:06:48 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4G537qTdk11w65mDhPFQU87YWX0nPj4tZ3zaAfIScG4=; b=L1dA89C1PGfssfDLqKzHJHRP5bAqHXbQ7hXJiSu9BhkdJX36U8MM3yxE9a8DowZScp ycZQopc7ikZ5FREcmEvaYa+AqrtKomGMm5+GxPJORzb408SdQVu9WXypYesvYcBaUeOf tYZUN40gLTJk0N/J1oMnjbbsC69hGkYZjVzO5Nq8u5vqpq/76G8YQKUfVc6S6ROOk0um VnSciP9neJgo2MzkUMr+1jXOz6SYQH+9Im/0WLlFn3f62gQ/iWWVIycDWf0csfABNUww NQIW0OrwXI0t02tB+Y8Ese6Bt3lrqQHPsM4ebtCtRJPiQsQEYKmYTxWqpI+U/sA0RqHX 1m8A==
X-Gm-Message-State: ALoCoQk3sk9PfkNicsAsWXEJdfwNgWzOsg3fdd8f48RlP8pBQBpL0XhgHQEggwBKPfkLYg6pbFIj
MIME-Version: 1.0
X-Received: by 10.152.88.1 with SMTP id bc1mr24844298lab.20.1427627208416; Sun, 29 Mar 2015 04:06:48 -0700 (PDT)
Received: by 10.25.143.4 with HTTP; Sun, 29 Mar 2015 04:06:48 -0700 (PDT)
X-Originating-IP: [190.247.34.93]
In-Reply-To: <55124CC3.80708@shiftleft.org>
References: <CAEoH-p4F006Uu8Xr=+V08DMAA5_yo2v8_6x-u6Yd+OMmh=_ytg@mail.gmail.com> <55124CC3.80708@shiftleft.org>
Date: Sun, 29 Mar 2015 08:06:48 -0300
Message-ID: <CAEoH-p5AL02YkTxJ7Abz9zJ=fxcvcJvLrh1nuOWs6=yUBAhpfw@mail.gmail.com>
From: Sergio Demian Lerner <sergio@coinspect.com>
To: Mike Hamburg <mike@shiftleft.org>
Content-Type: multipart/alternative; boundary="001a11c3540ca134d205126b5c77"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/gRkPaWEAFrxQh4nSRN5WSTpvUGM>
Cc: tls@ietf.org
Subject: Re: [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: Sun, 29 Mar 2015 11:06:53 -0000

Yes, you're right that the MAC construction in GCM allows the key owner to
find colissions. I was thinking that the auditing mode would be used in
combination with an emulated AEAD mode, such as AES_CBC + HMAC.

Best regards,
 Sergio.

On Wed, Mar 25, 2015 at 2:50 AM, Mike Hamburg <mike@shiftleft.org> wrote:

>  Hi Sergio,
>
> It is worth noting that MAC functions are not generally strong enough
> here.  For one thing, the MAC is meaningless to a party who doesn't know
> the key.  But even if you reveal the key afterwards, unless you're using a
> sufficiently long HMAC mode, a party who knows the key can probably find a
> message with the same MAC value.
>
> Cheers,
> -- Mike
>
>
> On 03/24/2015 08:09 PM, Sergio Demian Lerner wrote:
>
>    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
>
>
> _______________________________________________
> TLS mailing listTLS@ietf.orghttps://www.ietf.org/mailman/listinfo/tls
>
>
>


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