Re: [TLS] Comments/Questions on draft-gutmann-tls-encrypt-then-mac-00.txt

"Paul Bakker" <> Thu, 26 September 2013 06:41 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B948811E815F for <>; Wed, 25 Sep 2013 23:41:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.504
X-Spam-Status: No, score=-0.504 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_NL=0.55, HOST_EQ_NL=1.545]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 6ZSAxsnpRlMM for <>; Wed, 25 Sep 2013 23:41:23 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id E7EE911E8164 for <>; Wed, 25 Sep 2013 23:41:21 -0700 (PDT)
Received: from ([] helo=Slimpy) by with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1VP5A0-0003wk-Sf; Thu, 26 Sep 2013 08:34:52 +0200
From: "Paul Bakker" <>
To: "'Peter Gutmann'" <>, <>
References: <>
In-Reply-To: <>
Date: Thu, 26 Sep 2013 08:41:02 +0200
Message-ID: <007201ceba83$6164a130$242de390$>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQFhE9Rc+YY/ht8jD1tO4dwRZdRURpqy3GUQ
Content-Language: nl
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on
Subject: Re: [TLS] Comments/Questions on draft-gutmann-tls-encrypt-then-mac-00.txt
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 26 Sep 2013 06:41:29 -0000

> -----Original Message-----
> From: [] On Behalf Of
> Gutmann
> Sent: donderdag 26 september 2013 6:55
> To: <>
> Subject: Re: [TLS] Comments/Questions on draft-gutmann-tls-encrypt-then-
> mac-00.txt
> Martin Rex <> writes:
> >When changing from mac-pad-encrypt to encrypt-mac, as suggested by
> >Peter's draft, the MAC no longer operates on the TLSComressed PDU, but
> >on the TLSCiphertext PDU -- which results in:
> >
> >       HMAC_hash(MAC_write_secret, seq_num + TLSCiphertext.type +
> >                     TLSCiphertext.version + TLSCiphertext.length +
> >                     TLSCiphertext.fragment));
> So all that's necessary is to change the text to reflect this, and perhaps
a note
> to point it out?  That's fairly simple to do.

I'm rather new to the list and late for this party..

But 'skipping' a layer (the TLSCompressed one in this case) is a bad idea
for a number of reasons.

Code path verification.
In case this comes to fruition, instead of the clean:
  "Assemble Data -> Compress -> Cipher -> Send",
 we get
  "Assemble Data -> Maybe hash in some specific cases -> Compress -> Encrypt
and sometimes hash in some specific cases -> Send"

This makes checking code correctness a step harder, aside from the fact that
suddenly cryptographic information (which used to be only required in the
Cipher layer) suddenly needs to be available on other points as well..
Meaning more coupling between layers and functions. This is bad in my

Aside from the fact it's not pretty, there is a reason for having nice
separate layers, the fact that you can re-use / re-write the 'old buffer'
and do need to use unnecessary extra space. Violating that contract by
letting layers access the full data of another layer it should not see,
requires extra storage space, which on most embedded systems is very scarce.

I understand the issue, but in my opinion this is not the way to solve it.
So please reconsider solving the issue this way.