Re: [TLS] Adding a new signature scheme

Simon Josefsson <simon@josefsson.org> Wed, 12 August 2015 21:26 UTC

Return-Path: <simon@josefsson.org>
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 3F2CF1ACE0B for <tls@ietfa.amsl.com>; Wed, 12 Aug 2015 14:26:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.551
X-Spam-Level:
X-Spam-Status: No, score=-1.551 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_SE=0.35, SPF_PASS=-0.001] autolearn=no
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 3kD3sLf4h_EQ for <tls@ietfa.amsl.com>; Wed, 12 Aug 2015 14:26:26 -0700 (PDT)
Received: from duva.sjd.se (duva.sjd.se [IPv6:2001:9b0:1:1702::100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0AA841ACE08 for <tls@ietf.org>; Wed, 12 Aug 2015 14:26:25 -0700 (PDT)
Received: from latte.josefsson.org ([155.4.17.3]) (authenticated bits=0) by duva.sjd.se (8.14.4/8.14.4/Debian-4) with ESMTP id t7CLQ151018292 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 12 Aug 2015 23:26:02 +0200
From: Simon Josefsson <simon@josefsson.org>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
References: <20150807053956.GA5394@LK-Perkele-VII>
OpenPGP: id=54265E8C; url=http://josefsson.org/54265e8c.txt
X-Hashcash: 1:22:150812:tls@ietf.org::aYgCInCKhRC9llyE:3SHi
X-Hashcash: 1:22:150812:ilari.liusvaara@elisanet.fi::521OvvIwO30l6OT/:5YtN
Date: Wed, 12 Aug 2015 23:26:00 +0200
In-Reply-To: <20150807053956.GA5394@LK-Perkele-VII> (Ilari Liusvaara's message of "Fri, 7 Aug 2015 08:39:56 +0300")
Message-ID: <8737zob3mf.fsf@latte.josefsson.org>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
X-Virus-Scanned: clamav-milter 0.98.7 at duva.sjd.se
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/-1nJMhXRsJJwF_mBRuCAHADLVGI>
Cc: tls@ietf.org
Subject: Re: [TLS] Adding a new signature scheme
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: <https://mailarchive.ietf.org/arch/browse/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, 12 Aug 2015 21:26:28 -0000

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:

> This is about adding a new signature primitive (such as the
> (eventual) CFRG scheme).

I believe these aspects were already discussed in the EdDSA threads.  It
would be useful to establish consensus around these topics.

> There are basically two issues:
>
> 1) Do we allocate new ciphersuite codepoints or not? So far
> each certificate algorithm in ciphersuite has corresponded
> to only one signature algorithm.
>
> Implications of new codepoints:
> - More ciphersuites (about 11).
> - Needs TLS 1.2+ anyway, because the ciphers are presumably
>   AEAD mode and those need TLS 1.2+.
> - Keep existing semantics.
>
> Implication of reusing ECDSA codepoints.
> - No new ciphersuites
> - Needs TLS 1.2+
> - Redefines existing semantics a bit.

The feedback I got on draft-josefsson-tls-eddsa from several people was
to reuse the ECDSA codepoints instead of defining new ciphersuites.  I
am currently (mildly) in favor of that, as it appears to imply less work
for everyone.  I have since published draft-josefsson-tls-eddsa2 that
adopts that approach.  I decided to fork the draft so both are available
and can be evaluated on its own.  They are available here:

https://tools.ietf.org/html/draft-josefsson-tls-eddsa
https://tools.ietf.org/html/draft-josefsson-tls-eddsa2

> 2) What does the SignatureAndHashAlgorithm.hash mean exactly? The
> TLS 1.2 RFC isn't specific enough.

I believe the document introducing a new signature primitive must be
clear about this.  I don't believe TLS 1.2 mandates any particular
interpretation here, so it is up to the new primitive to define
semantics.

I believe the choice is not particular interesting, as long as the
specification is clear about what is intended.  For example,
draft-josefsson-tls-eddsa uses "none", and draft-josefsson-tls-eddsa2
uses "sha512", and both are in their own way a bit redundant.

> I see two choices:
> a) The field sets hash (prehash) to perform before passing the
>    hash to be signed (the description of "none" and description of
>    Certificate Verify message hints at this interpretation).
> b) The field parameterizes the signature scheme in some scheme-
>    specific way (but what would "none" mean in context of this,
>    the scheme having no hash parameters?).
>
> All the existing schemes are compatible with interpratation a).
>
> But for proposals for CFRG scheme: All proposed schemes have a
> hash parameter (the only one or one of two) that is incompatible
> with interpretation a):
>
> 1) Only one hash that does not prehash the message.
> 2) Two hash functions, one prehash (can be identity) and
>    one internal hash. Prehash can be chosen per-signature.
> 3) Two hash functions, one prehash (can be identity) and
>    one internal hash. Prehash is not indicated, so one
>    has to be careful changing it.
>
> So if interpretation a) is the correct one, one presumably has to
> fix the internal hash in signature scheme codepoint (E.g. to
> SHA-512 for signature scheme #4).

I don't think we can come any closer to my discussion above until we
know what the CFRG outcome is.

/Simon