Wikipedia / Elliptic Curve Digital Signature Algorithm
Wikipedia / 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.
Key and signature sizes
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. For example, at a security level of 80 bits operations to find the private key operations.
Signature generation algorithm
Suppose Alice wants to send a signed message to Bob. In addition to the field. must be prime. Indeed, we assume that every nonzero element of the ring must be a field must be prime (cf. Bézout's identity).
to denote elliptic curve point multiplication by a scalar.
, she follows these steps:
. (Here HASH is a cryptographic hash function, such as SHA-2, with the output converted to an integer.)
can be greater but not longer.)
Select a cryptographically secure random.
.
, go back to step 3.
, go back to step 3.
is also a valid signature.)
.
This implementation failure was used, for example, to extract the signing key used for the PlayStation 3 gaming-console.
is generated by a faulty random number generator. Such a failure in random number generation caused users of Android Bitcoin Wallet to lose their funds in August 2013.
from both the message and the private key.
Signature verification algorithm
is a valid curve point as follows:
is not equal to the identity element , and its coordinates are otherwise valid.
lies on the curve.
.
After that, Bob follows these steps:
Verify that and . If not, the signature is invalid.
, where HASH is the same function used in the signature generation.
leftmost bits of .
.
then the signature is invalid.
, invalid otherwise.
can be calculated faster than two scalar multiplications done independently.
Correctness of the algorithm
It is not immediately obvious why verification even functions correctly. To see why, denote as the curve point computed in step 5 of verification,
,
Because elliptic curve scalar multiplication distributes over addition,
from verification step 4,
,
Expanding the definition of from signature step 6,
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
From the definition of , this is verification step 6.
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.
Public key recovery
Given a message on that message, Bob can (potentially) recover Alice's public key:
Verify that and . If not, the signature is invalid.
is not too large for the field is a value such that the curve equation is satisfied. Note that there may be several curve points satisfying these conditions, and each different value results in a distinct recovered key.
, where HASH is the same function used in the signature generation.
Let leftmost bits of .
.
.
, matches Alice's public key.
The signature is invalid if all the possible points have been tried and none match Alice's public key.
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.
Correctness of the recovery algorithm
from recovery step 6,
from signing step 4,
Because elliptic curve scalar multiplication distributes over addition,
from recovery step 5,
Expanding the definition of 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,
, this is Alice's public key.
from signature value .
Security
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 was static instead of random. As pointed out in the Signature generation algorithm solvable, rendering the entire algorithm useless.
On March 29, 2011, two researchers published an IACR paper 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. The vulnerability was fixed in OpenSSL 1.0.0f.
In August 2013, it was revealed that bugs in some implementations of the Java class SecureRandom value. 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.
This issue can be prevented by deterministic generation of k, as described by RFC 6979.
Concerns
Some concerns expressed about ECDSA:
Political concerns: the trustworthiness of NIST-produced curves being questioned after revelations were made that the NSA willingly inserts backdoors into software, hardware components and published standards; well-known cryptographers have expressed doubts about how the NIST curves were designed, and voluntary tainting has already been proved in the past. (See also the libssh curve25519 introduction.) Nevertheless, a proof that the named NIST curves exploit a rare weakness is still missing.
Technical concerns: the difficulty of properly implementing the standard, its slowness, and design flaws which reduce security in insufficiently defensive implementations.
Implementations
Below is a list of cryptographic libraries that provide support for ECDSA:
See also
References
Further reading
Accredited Standards Committee X9, ASC X9 Issues New Standard for Public Key Cryptography/ECDSA, Oct. 6, 2020. Source
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 Smart, editors, Advances in Elliptic Curve Cryptography, London Mathematical Society Lecture Note Series 317, Cambridge University Press, 2005.
External links
The Elliptic Curve Digital Signature Algorithm (ECDSA); provides an in-depth guide on ECDSA. Wayback link