Re: [TLS] Safe ECC usage

Manuel Pégourié-Gonnard <> Tue, 01 October 2013 17:29 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D234A21E8085 for <>; Tue, 1 Oct 2013 10:29:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id NFNdcBCoMjD4 for <>; Tue, 1 Oct 2013 10:29:15 -0700 (PDT)
Received: from ( [IPv6:2001:4b98:dc0:41:216:3eff:feeb:c406]) by (Postfix) with ESMTP id 4439B21E81B9 for <>; Tue, 1 Oct 2013 10:29:14 -0700 (PDT)
Received: from (unknown [IPv6:2a01:e35:8a5d:80b0:be5f:f4ff:fe2c:95bc]) by (Postfix) with ESMTPS id 72298160E7 for <>; Tue, 1 Oct 2013 19:29:12 +0200 (CEST)
Received: from [] (unknown []) by (Postfix) with ESMTPSA id 5BD6529956 for <>; Tue, 1 Oct 2013 19:29:11 +0200 (CEST)
Message-ID: <>
Date: Tue, 01 Oct 2013 19:26:56 +0200
From: =?ISO-8859-1?Q?Manuel_P=E9gouri=E9-Gonnard?= <>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130413 Icedove/17.0.5
MIME-Version: 1.0
References: <> <>
In-Reply-To: <>
X-Enigmail-Version: 1.5.2
OpenPGP: id=98EED379; url=
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [TLS] Safe ECC usage
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: Tue, 01 Oct 2013 17:29:15 -0000

On 01/10/2013 18:22, Johannes Merkle wrote:
>>> Other than certificate size and the speed of making those
>>> calculations?  Really, try "openssl speed rsa2048 ecdsap256" on any
>>> Linux or Mac machine.
>> openssl 1.0.1c x86_64 tells me ecdsap256 is 10x faster than rsa2048
>> for signing and 10x slower than rsa2048 for verifying.
> RSA is much faster for signing than for verifying, while for ECDSA the
> time for these operations are quite similar.
> So lets assume, ECDSA singing or verifying takes 1/10 s, then RSA
> signing takes 1 s and verifying 1/100 sec. Makes 0.2 s for ECDSA based
> handshake (one signing and one verifying operation) and 1.01 s for
> RSA. That is a huge difference.
Let's do the math, using openssl speed's results (1.0.1e on x86_64 linux,
slightly edited for clarity):

                              sign    verify
rsa 2048 bits            0.001558s 0.000048s
256 bit ecdsa (nistp256)   0.0001s   0.0003s

Now assuming the peer's certificate is signed by an intermediate CA,
itself signed by a root CA, we have 1 sign, 1 verify for the KeyExchange
or CertificateVerify message, 2 verify-s (signature by CA + crl) for the
peer's certificate, same for the intermediate CA, a total of 1 sign + 5

rsa 2048 bits:  1.8 ms
ecdsa 256 bits: 1.6 ms

So the two are mostly equivalent (with the NIST curve, a brainpool curve
would probably be slower, and a modern curve such a Ed25519 faster). ECDSA has
an advantage as soon as the certificate chain is shorter, up to a factor 4 for a
0-length certificate chain.

(Also, this is assuming the same key size and type for all certificates.
Certainly the best case for overall handshake speed is when the end-entity
certificate uses ECDSA while CA certificates use RSA.)

However, in a context where servers need to handle more handshakes per
second than clients and most handshakes don't use client auth, ecdsa is
interesting since it transfers some load from the server to the client,
probably a good news for server operators.