World Library  
Flag as Inappropriate
Email this Article




The Elliptic Curve Digital Signature Algorithm (ECDSA) is a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve cryptography.

Key and signature size comparison to DSA

As with elliptic curve cryptography in general, the bit size of the public key believed to be needed for ECDSA is about twice the size of the security level, in bits. By comparison, at a security level of 80 bits, meaning an attacker requires the equivalent of about 2^{80} operations to find the private key, the size of a DSA public key is at least 1024 bits, whereas the size of an ECDSA public key would be 160 bits. On the other hand, the signature size is the same for both DSA and ECDSA: 4 t bits, where t is the security level measured in bits, that is, about 320 bits for a security level of 80 bits.

Signature generation algorithm

CURVE the elliptic curve field and equation used
G elliptic curve base point, a generator of the elliptic curve with large prime order n
n integer order of G, means that n * G = O

Suppose Alice wants to send a signed message to Bob. Initially, the curve parameters (CURVE, G, n) must be agreed upon. In addition to the field and equation of the curve, we need G, a base point of prime order on the curve; n is the multiplicative order of the point G.

Alice creates a key pair, consisting of a private key integer d_A, randomly selected in the interval [1, n-1]; and a public key curve point Q_A = d_A * G. We use * to denote elliptic curve point multiplication by a scalar.

For Alice to sign a message m, she follows these steps:

  1. Calculate e = \textrm{HASH}(m), where HASH is a cryptographic hash function, such as SHA-1.
  2. Let z be the L_n leftmost bits of e, where L_n is the bit length of the group order n.
  3. Select a random integer k from [1, n-1].
  4. Calculate the curve point (x_1, y_1) = k * G.
  5. Calculate r = x_1\,\bmod\,n. If r = 0, go back to step 3.
  6. Calculate s = k^{-1}(z + r d_A)\,\bmod\,n. If s = 0, go back to step 3.
  7. The signature is the pair (r, s).

When computing s, the string z resulting from \textrm{HASH}(m) shall be converted to an integer. Note that z can be greater than n but not longer.[1]

As the standard notes, it is crucial to select different k for different signatures, otherwise the equation in step 6 can be solved for d_A, the private key: Given two signatures (r,s) and (r,s'), employing the same unknown k for different known messages m and m', an attacker can calculate z and z', and since s-s' = k^{-1}(z-z') (all operations in this paragraph are done modulo n) the attacker can find k = \frac{z-z'}{s-s'}. Since s = k^{-1}(z + r d_A), the attacker can now calculate the private key d_A = \frac{s k - z}{r}. This implementation failure was used, for example, to extract the signing key used in the PlayStation 3 gaming console.[2]

Signature verification algorithm

For Bob to authenticate Alice's signature, he must have a copy of her public key curve point Q_A. Bob can verify Q_A is a valid curve point as follows:

  1. Check that Q_A is not equal to the identity element O, and its coordinates are otherwise valid
  2. Check that Q_A lies on the curve
  3. Check that n * Q_A = O

After that, Bob follows these steps:

  1. Verify that r and s are integers in [1, n-1]. If not, the signature is invalid.
  2. Calculate e = \textrm{HASH}(m), where HASH is the same function used in the signature generation.
  3. Let z be the L_n leftmost bits of e.
  4. Calculate w = s^{-1}\,\bmod\,n.
  5. Calculate u_1 = zw\,\bmod\,n and u_2 = rw\,\bmod\,n.
  6. Calculate the curve point (x_1, y_1) = u_1 * G + u_2 * Q_A.
  7. The signature is valid if r \equiv x_1 \pmod{n}, invalid otherwise.

Note that using Straus's algorithm (also known as Shamir's trick) a sum of two scalar multiplications u_1 * G + u_2 * Q_A can be calculated faster than with two scalar multiplications.[3]

Correctness of the Algorithm

It is not immediately obvious why verification even functions correctly. To see why, denote as C the curve point computed in step 6 of verification,

C=u_1 * G + u_2 * Q_A

From the definition of the public key as Q_A=d_A * G,

C=u_1 * G + u_2 d_A * G

Because elliptic curve scalar multiplication distributes over addition,

C=(u_1 + u_2 d_A) * G

Expanding the definition of u_1 and u_2 from verification step 4,

C=(z s^{-1}+r d_A s^{-1})*G

Collecting the common term s^{-1},

C=(z + r d_A) s^{-1} * G

Expanding the definition of s from signature step 6,

C=(z + r d_A) (z+r d_A)^{-1} (k^{-1})^{-1} * G

Since the inverse of an inverse is the original element, and the product of an element's inverse and the element is the identity, we are left with

C=k * G

From the definition of r, this is verification step 6.

This shows only that a correctly signed message will verify correctly; many other properties are required for a secure signature algorithm.


In December 2010, a group calling itself fail0verflow announced recovery of the ECDSA private key used by Sony to sign software for the PlayStation 3 game console. However, this attack only worked because Sony did not properly implement the algorithm, because k was static instead of random. As pointed out in #Signature generation algorithm, above, this makes d_A solvable and the entire algorithm useless.[4]

On March 29, 2011, two researchers published an IACR paper[5] demonstrating that it is possible to retrieve a TLS private key of a server using OpenSSL that authenticates with Elliptic Curves DSA over a binary field via a timing attack.[6] The vulnerability was fixed in OpenSSL 1.0.0e.[7]

In August 2013, it was revealed that bugs in some implementations of the

This issue can be prevented by deterministic generation of k, as described by RFC 6979.

See also



  • Accredited Standards Committee X9, American National Standard X9.62-2005, Public Key Cryptography for the Financial Services Industry, The Elliptic Curve Digital Signature Algorithm (ECDSA), November 16, 2005.
  • Certicom Research, , Version 2.0, May 21, 2009.
  • López, J. and Dahab, R. , Technical Report IC-00-10, State University of Campinas, 2000.
  • Daniel J. Bernstein, Pippenger's exponentiation algorithm, 2002.
  • Daniel R. L. Brown, Generic Groups, Collision Resistance, and ECDSA, Designs, Codes and Cryptography, 35, 119–152, 2005. ePrint version
  • Ian F. Blake, Gadiel Seroussi, and Nigel P. Smart, editors, Advances in Elliptic Curve Cryptography, London Mathematical Society Lecture Note Series 317, Cambridge University Press, 2005.
  • expand by hand

External links

  • Digital Signature Standard; includes info on ECDSA
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.