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

"Christian Kahlo" <christian.kahlo@ageto.net> Mon, 23 September 2013 16:11 UTC

Return-Path: <christian.kahlo@ageto.net>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A92F921F9E9C for <tls@ietfa.amsl.com>; Mon, 23 Sep 2013 09:11:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.066
X-Spam-Level:
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 mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id seM+sWO8c+Sk for <tls@ietfa.amsl.com>; Mon, 23 Sep 2013 09:11:22 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id D3AB921F9E76 for <tls@ietf.org>; Mon, 23 Sep 2013 09:11:21 -0700 (PDT)
Received: by mail-bk0-f44.google.com with SMTP id mz10so1253876bkb.31 for <tls@ietf.org>; Mon, 23 Sep 2013 09:11:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; 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 10.204.168.197 with SMTP id v5mr18450459bky.24.1379952680244; Mon, 23 Sep 2013 09:11:20 -0700 (PDT)
Received: from THINK2 (cable-82-119-12-81.cust.telecolumbus.net. [82.119.12.81]) by mx.google.com with ESMTPSA id z6sm9012704bkn.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Sep 2013 09:11:19 -0700 (PDT)
From: "Christian Kahlo" <christian.kahlo@ageto.net>
To: "'Nikos Mavrogiannopoulos'" <nmav@gnutls.org>
References: <CABcZeBN+0hX1-cb0V4AyaO3FrwaGrtjbRO3BGOV0KBSjRkNwkw@mail.gmail.com> <523c738f.0733cc0a.41a0.3096@mx.google.com> <523F383A.20803@drh-consultancy.co.uk> <523FE7B6.10501@gnutls.org> <524038fa.c402cd0a.127a.ffffc841@mx.google.com> <524047D1.7040601@gnutls.org>
In-Reply-To: <524047D1.7040601@gnutls.org>
Date: Mon, 23 Sep 2013 18:11:25 +0200
Organization: AGETO Innovation GmbH
Message-ID: <52406827.c664cc0a.2ad0.ffffd7f7@mx.google.com>
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' <npa@ageto.net>, tls@ietf.org
Subject: Re: [TLS] Comments/Questions on draft-gutmann-tls-encrypt-then-mac-00.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: c.kahlo@ageto.net
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: Mon, 23 Sep 2013 16:11:26 -0000

Hi Nikos,

> > maybe you want to read http://cseweb.ucsd.edu/~mihir/papers/oem.pdf
> > and http://www.iacr.org/archive/crypto2001/21390309.pdf.
> > Both mentioned within this thread:
> > http://crypto.stackexchange.com/questions/202/should-we-mac-then-
> > 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

Yes.

> 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
1996-03-04.

> > 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-
then-Mac.
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
change".

> 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,
Christian