Elliptic Curve Digital Signature Algorithm

In cryptography, the Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic-curve cryptography.

As with elliptic-curve cryptography in general, the bit size of the private key believed to be needed for ECDSA is about twice the size of the security level, in bits.

[1] For example, at a security level of 80 bits—meaning an attacker requires a maximum of about

On the other hand, the signature size is the same for both DSA and ECDSA: approximately

Suppose Alice wants to send a signed message to Bob.

, a base point of prime order on the curve;

to denote elliptic curve point multiplication by a scalar.

This implementation failure was used, for example, to extract the signing key used for the PlayStation 3 gaming-console.

Such a failure in random number generation caused users of Android Bitcoin Wallet to lose their funds in August 2013.

is a valid curve point as follows: After that, Bob follows these steps: Note that an efficient implementation would compute inverse

Also, using Shamir's trick, a sum of two scalar multiplications

can be calculated faster than two scalar multiplications done independently.

[6] It is not immediately obvious why verification even functions correctly.

To see why, denote as C the curve point computed in step 5 of verification, From the definition of the public key as

, Because elliptic curve scalar multiplication distributes over addition, Expanding the definition of

from verification step 4, Collecting the common term

This shows only that a correctly signed message will verify correctly; other properties such as incorrectly signed messages failing to verify correctly and resistance to cryptanalytic attacks are required for a secure signature algorithm.

on that message, Bob can (potentially) recover Alice's public key:[7] Note that an invalid signature, or a signature from a different message, will result in the recovery of an incorrect public key.

The recovery algorithm can only be used to check validity of a signature if the signer's public key (or its hash) is known beforehand.

from signing step 4, Because elliptic curve scalar multiplication distributes over addition, Expanding the definition of

from recovery step 5, Expanding the definition of s from signature step 6, Since the product of an element's inverse and the element is the identity, we are left with The first and second terms cancel each other out, From the definition of

This shows that a correctly signed message will recover the correct public key, provided additional information was shared to uniquely calculate curve point

from signature value r. In December 2010, a group calling itself fail0verflow announced the 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

As pointed out in the Signature generation algorithm section above, this makes

solvable, rendering the entire algorithm useless.

[8] On March 29, 2011, two researchers published an IACR paper[9] 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.

[11] In August 2013, it was revealed that bugs in some implementations of the Java class SecureRandom sometimes generated collisions in the

This allowed hackers to recover private keys giving them the same control over bitcoin transactions as legitimate keys' owners had, using the same exploit that was used to reveal the PS3 signing key on some Android app implementations, which use Java and rely on ECDSA to authenticate transactions.

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