Elliptic Curve DSA

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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

Contents

[edit] 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 280 signature generations 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: 4t bits, where t is the security level measured in bits, that is, about 320 bits for a security level of 80 bits.

[edit] Signature generation algorithm

Parameter
q field size
FR the basis used
a, b field elements defining the point of the curve
DPS DomainParameterSeed, optional
G base point
n order of G
h cofactor

Suppose Alice wants to send a signed message to Bob. Initially, the curve parameters (q,FR,a,b,[DomainParameterSeed,]G,n,h) must be agreed upon. q is the field size; FR is an indication of the basis used; a and b are two field elements that define the equation of the curve; DomainParameterSeed is an optional bit string that is present if the elliptic curve was randomly generated in a verifiable fashion;G is a base point of prime order on the curve (i.e., G = (xG,yG)); n is the order of the point G; and h is the cofactor (which is equal to the order of the curve divided by n).

Also, Alice must have a key pair suitable for elliptic curve cryptography, consisting of a private key dA (a randomly selected integer in the interval [1,n − 1]) and a public key QA (where QA = dAG). Let Ln be the bit length of the group order n.

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

  1. Calculate e = HASH(m), where HASH is a cryptographic hash function, such as SHA-1, and let z be the Ln leftmost bits of e.
  2. Select a random integer k from [1,n − 1].
  3. Calculate r = x1(mod n), where (x1,y1) = kG. If r = 0, go back to step 2.
  4. Calculate s = k − 1(z + rdA)(mod n). If s = 0, go back to step 2.
  5. The signature is the pair (r,s).

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

It is crucial to select different k for different signatures, otherwise the equation in step 4 can be solved for dA, 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 ss' = k − 1(zz') (all operations in this paragraph are done modulo n) the attacker can find k = \frac{z-z'}{s-s'}. Since s = k − 1(z + rdA), the attacker can now calculate the private key d_A = \frac{s k - z}{r}. This cryptographic failure was used, for example, to extract the signing key used in the PlayStation 3 gaming console.[2]

[edit] Signature verification algorithm

For Bob to authenticate Alice's signature, he must have a copy of her public key QA. If he does not trust the source of QA, he needs to validate the key (O here indicates the identity element):

  1. Check that QA is not equal to O and its coordinates are otherwise valid
  2. Check that QA lies on the curve
  3. Check that nQA = 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 = HASH(m), where HASH is the same function used in the signature generation. Let z be the Ln leftmost bits of e.
  3. Calculate w = s − 1(mod n).
  4. Calculate u1 = zw(mod n) and u2 = rw(mod n).
  5. Calculate (x1,y1) = u1G + u2QA.
  6. The signature is valid if r = x1(mod n), invalid otherwise.

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

[edit] Security

On March 29th, 2011, two researchers published a IACR paper[4] 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[5]. The vulnerability was fixed in OpenSSL 1.0.0e[6].

[edit] See also

[edit] Notes

  1. ^ FIPS 186-3, pp. 19 and 26
  2. ^ http://events.ccc.de/congress/2010/Fahrplan/attachments/1780_27c3_console_hacking_2010.pdf, page 123–128
  3. ^ http://www.lirmm.fr/~imbert/talks/laurent_Asilomar_08.pdf The Double-Base Number System in Elliptic Curve Cryptography
  4. ^ http://eprint.iacr.org/2011/232
  5. ^ https://www.kb.cert.org/vuls/id/536044
  6. ^ http://www.openssl.org/news/changelog.html

[edit] References

  • 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, Standards for efficient cryptography, SEC 1: Elliptic Curve Cryptography, Version 2.0, May 21, 2009.
  • López, J. and Dahab, R. An Overview of Elliptic Curve Cryptography, 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.
  • Darrel Hankerson, Alfred Menezes and Scott Vanstone, Guide to Elliptic Curve Cryptography, Springer, Springer, 2004.

[edit] External links

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages