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

"Christian Kahlo" <> Mon, 23 September 2013 16:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A92F921F9E9C for <>; Mon, 23 Sep 2013 09:11:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.066
X-Spam-Status: No, score=-3.066 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, SARE_URI_OEM=0.533]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id seM+sWO8c+Sk for <>; Mon, 23 Sep 2013 09:11:22 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id D3AB921F9E76 for <>; Mon, 23 Sep 2013 09:11:21 -0700 (PDT)
Received: by with SMTP id mz10so1253876bkb.31 for <>; Mon, 23 Sep 2013 09:11:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:reply-to:from:to:cc:references:in-reply-to :subject:date:organization:message-id:mime-version:content-type :content-transfer-encoding:thread-index:content-language; bh=LDgGOHXqZ7yTcHZZ9vv347eaKf8XpS2laClD14QrZ08=; b=HwVYh/8Ksoop7QYd3XvIF2intovdoMnSaFkir91QhQxZ48xicN6zg9vsMPsZzJoNd8 9ov2YCVSiJivbucwPd8068FNcgYSAFQCwnC7JKw6gwn1x5HKzPiEF3/zOopZajNQjXpV +GSRVoghgH4RYNoJoiStAfUT78j0HxpDro3YGXxcuDJu6mO7x/BebUW5Gjsk+2yUZcCK u/aYnRNOgpCWNXJBT8g4NnVkmAH5RlUuQ0GawXqX+3fbHjLqsTCxCuOuT/DABFiQ1Cw/ ReEFiF1Bj+yxE5R5gMUw574uHpKMGkZU5Fh7Qrlz0xbMx4LvRX4UUI4VWtdfp2YSjyQm jXnQ==
X-Gm-Message-State: ALoCoQmMK8WEf6DGAQduaC6aw/fla96EYuXep3YPv0PucMETnqN7morRdUv+yts3DGdu+5F3ODLs
X-Received: by with SMTP id v5mr18450459bky.24.1379952680244; Mon, 23 Sep 2013 09:11:20 -0700 (PDT)
Received: from THINK2 ( []) by with ESMTPSA id z6sm9012704bkn.8.1969. (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Sep 2013 09:11:19 -0700 (PDT)
From: "Christian Kahlo" <>
To: "'Nikos Mavrogiannopoulos'" <>
References: <> <> <> <> <> <>
In-Reply-To: <>
Date: Mon, 23 Sep 2013 18:11:25 +0200
Organization: AGETO Innovation GmbH
Message-ID: <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac64ZW2U50kRXnQxSaSq9J2JttsfIgAD1x0Q
Content-Language: de
X-Mailman-Approved-At: Tue, 24 Sep 2013 09:33:53 -0700
Cc: 'Team Neuer Personalausweis' <>,
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: Mon, 23 Sep 2013 16:11:26 -0000

Hi Nikos,

> > maybe you want to read
> > and
> > Both mentioned within this thread:
> >
> > encrypt-or-encrypt-then-mac
> Have you actually read the papers you mention? For example have you

Phew, years ago probably. I just looked them up.

> seen theorem 2 of the second paper? The issue is with the


> unauthenticated padding used in TLS not AtE. There are only

And that's why it shouldn't be used this way. :-)

> philosophical advantages of EtA over AtE when the latter is implemented
> properly (i.e., as not in TLS). Today we have more clues on the issues
> of AtE than it was at the time TLS was designed.

That's absolutely right of course. MtE is in SSL/TLS at least since

> > Please tell us which protocols are still using Mac-then-Encrypt today
> > without running into any security trouble (esp. chosen ciphertext
> > attacks). MtE is considered as a design fail by many researchers.
> TLS with stream ciphers. It is authenticate-pad-then-Encrypt that has
> issues, please check the literature more carefully.

I've read it. Actually, what we're doing with EtM is Pad-then-Encrypt-
Regarding stream ciphers: yes, but keep in mind people like to mix it
up with RC4 and you've to say you mean i.e. AES in CTR mode or similar.

> > As we discussed earlier AEAD might be a solution, but AEAD is not the
> > only one. I would encourage everbody to also have a look into
> > ISO7816-4 secure messaging. That's the way most electronic ID cards,
> > electronic purse cards, credit cards, small HSMs, etc. do
> communicate.
> > And now think about that there's a reason for that it's an EtM-
> > scheme.
> > Sorry, your attitude "there isn't a need to innovate" sounds somewhat
> > unfamiliar with cryptographic primitives to me.
> Please read my mail again. The innovate refers to how the current EtA

Done that.

> proposal by Peter ignores all best practices in implementing EtA in

OK, got it. To me it read like "no need to innovate" as in "no need to

> protocols. Existing EtA protocols like IPSec truncate the HMAC to avoid

You've got RFC 6066 truncated_hmac if you want it to do this way.
Peters approach to keep things as much as simple as possible seems
OK to me.

> revealing the whole internal state of the hash algorithm. The Preneel-
> van-Oorschot paper referenced previously in the thread gives a detailed
> treatment of the issues (admittedly HMAC was designed to discourage
> these attacks, but being conservative is a good design practice).

We've had a lot of discussions about this. Strictly speaking if a non-
truncated HMac reveals (too much) information of the internal state of
the hash algorithm something totally went wrong with the hash function.

As a result of this BSI TR-03116-4 chapter 2.3, 1st bullet states
"do not use truncated_hmac". I'm sorry again for the lack of an english
translation at the moment. The Federal Office for Information Security
will probably provide one later.

In THEORY a truncated_hmac offers an option for attacks as only a
fraction of the original HMac has to match.

Best regards,