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-size

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—meaning an attacker requires a maximum of about Elliptic Curve Digital Signature Algorithm  operations to find the private key—the size of an ECDSA private key would be 160 bits. On the other hand, the signature size is the same for both DSA and ECDSA: approximately Elliptic Curve Digital Signature Algorithm  bits, where Elliptic Curve Digital Signature Algorithm  is the exponent in the formula Elliptic Curve Digital Signature Algorithm , that is, about 320 bits for a security level of 80 bits, which is equivalent to Elliptic Curve Digital Signature Algorithm  operations.

Signature generation algorithm

Suppose Alice wants to send a signed message to Bob. Initially, they must agree on the curve parameters Elliptic Curve Digital Signature Algorithm . In addition to the field and equation of the curve, we need Elliptic Curve Digital Signature Algorithm , a base point of prime order on the curve; Elliptic Curve Digital Signature Algorithm  is the multiplicative order of the point Elliptic Curve Digital Signature Algorithm .

Parameter
CURVE the elliptic curve field and equation used
G elliptic curve base point, a point on the curve that generates a subgroup of large prime order n
n integer order of G, means that Elliptic Curve Digital Signature Algorithm , where Elliptic Curve Digital Signature Algorithm  is the identity element.
Elliptic Curve Digital Signature Algorithm  the private key (randomly selected)
Elliptic Curve Digital Signature Algorithm  the public key Elliptic Curve Digital Signature Algorithm  (calculated by elliptic curve)
m the message to send

The order Elliptic Curve Digital Signature Algorithm  of the base point Elliptic Curve Digital Signature Algorithm  must be prime. Indeed, we assume that every nonzero element of the ring Elliptic Curve Digital Signature Algorithm  is invertible, so that Elliptic Curve Digital Signature Algorithm  must be a field. It implies that Elliptic Curve Digital Signature Algorithm  must be prime (cf. Bézout's identity).

Alice creates a key pair, consisting of a private key integer Elliptic Curve Digital Signature Algorithm , randomly selected in the interval Elliptic Curve Digital Signature Algorithm ; and a public key curve point Elliptic Curve Digital Signature Algorithm . We use Elliptic Curve Digital Signature Algorithm  to denote elliptic curve point multiplication by a scalar.

For Alice to sign a message Elliptic Curve Digital Signature Algorithm , she follows these steps:

  1. Calculate Elliptic Curve Digital Signature Algorithm . (Here HASH is a cryptographic hash function, such as SHA-2, with the output converted to an integer.)
  2. Let Elliptic Curve Digital Signature Algorithm  be the Elliptic Curve Digital Signature Algorithm  leftmost bits of Elliptic Curve Digital Signature Algorithm , where Elliptic Curve Digital Signature Algorithm  is the bit length of the group order Elliptic Curve Digital Signature Algorithm . (Note that Elliptic Curve Digital Signature Algorithm  can be greater than Elliptic Curve Digital Signature Algorithm  but not longer.)
  3. Select a cryptographically secure random integer Elliptic Curve Digital Signature Algorithm  from Elliptic Curve Digital Signature Algorithm .
  4. Calculate the curve point Elliptic Curve Digital Signature Algorithm .
  5. Calculate Elliptic Curve Digital Signature Algorithm . If Elliptic Curve Digital Signature Algorithm , go back to step 3.
  6. Calculate Elliptic Curve Digital Signature Algorithm . If Elliptic Curve Digital Signature Algorithm , go back to step 3.
  7. The signature is the pair Elliptic Curve Digital Signature Algorithm . (And Elliptic Curve Digital Signature Algorithm  is also a valid signature.)

As the standard notes, it is not only required for Elliptic Curve Digital Signature Algorithm  to be secret, but it is also crucial to select different Elliptic Curve Digital Signature Algorithm  for different signatures. Otherwise, the equation in step 6 can be solved for Elliptic Curve Digital Signature Algorithm , the private key: given two signatures Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm , employing the same unknown Elliptic Curve Digital Signature Algorithm  for different known messages Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm , an attacker can calculate Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm , and since Elliptic Curve Digital Signature Algorithm  (all operations in this paragraph are done modulo Elliptic Curve Digital Signature Algorithm ) the attacker can find Elliptic Curve Digital Signature Algorithm . Since Elliptic Curve Digital Signature Algorithm , the attacker can now calculate the private key Elliptic Curve Digital Signature Algorithm .

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

Another way ECDSA signature may leak private keys is when Elliptic Curve Digital Signature Algorithm  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.

To ensure that Elliptic Curve Digital Signature Algorithm  is unique for each message, one may bypass random number generation completely and generate deterministic signatures by deriving Elliptic Curve Digital Signature Algorithm  from both the message and the private key.

Signature verification algorithm

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

  1. Check that Elliptic Curve Digital Signature Algorithm  is not equal to the identity element O, and its coordinates are otherwise valid.
  2. Check that Elliptic Curve Digital Signature Algorithm  lies on the curve.
  3. Check that Elliptic Curve Digital Signature Algorithm .

After that, Bob follows these steps:

  1. Verify that r and s are integers in Elliptic Curve Digital Signature Algorithm . If not, the signature is invalid.
  2. Calculate Elliptic Curve Digital Signature Algorithm , where HASH is the same function used in the signature generation.
  3. Let Elliptic Curve Digital Signature Algorithm  be the Elliptic Curve Digital Signature Algorithm  leftmost bits of e.
  4. Calculate Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm .
  5. Calculate the curve point Elliptic Curve Digital Signature Algorithm . If Elliptic Curve Digital Signature Algorithm  then the signature is invalid.
  6. The signature is valid if Elliptic Curve Digital Signature Algorithm , invalid otherwise.

Note that an efficient implementation would compute inverse Elliptic Curve Digital Signature Algorithm  only once. Also, using Shamir's trick, a sum of two scalar multiplications Elliptic Curve Digital Signature Algorithm  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 C the curve point computed in step 5 of verification,

    Elliptic Curve Digital Signature Algorithm 

From the definition of the public key as Elliptic Curve Digital Signature Algorithm ,

    Elliptic Curve Digital Signature Algorithm 

Because elliptic curve scalar multiplication distributes over addition,

    Elliptic Curve Digital Signature Algorithm 

Expanding the definition of Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm  from verification step 4,

    Elliptic Curve Digital Signature Algorithm 

Collecting the common term Elliptic Curve Digital Signature Algorithm ,

    Elliptic Curve Digital Signature Algorithm 

Expanding the definition of s from signature step 6,

    Elliptic Curve Digital Signature Algorithm 

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

    Elliptic Curve Digital Signature Algorithm 

From the definition of r, 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 m and Alice's signature Elliptic Curve Digital Signature Algorithm  on that message, Bob can (potentially) recover Alice's public key:

  1. Verify that r and s are integers in Elliptic Curve Digital Signature Algorithm . If not, the signature is invalid.
  2. Calculate a curve point Elliptic Curve Digital Signature Algorithm  where Elliptic Curve Digital Signature Algorithm  is one of Elliptic Curve Digital Signature Algorithm , Elliptic Curve Digital Signature Algorithm , Elliptic Curve Digital Signature Algorithm , etc. (provided Elliptic Curve Digital Signature Algorithm  is not too large for the field of the curve) and Elliptic Curve Digital Signature Algorithm  is a value such that the curve equation is satisfied. Note that there may be several curve points satisfying these conditions, and each different R value results in a distinct recovered key.
  3. Calculate Elliptic Curve Digital Signature Algorithm , where HASH is the same function used in the signature generation.
  4. Let z be the Elliptic Curve Digital Signature Algorithm  leftmost bits of e.
  5. Calculate Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm .
  6. Calculate the curve point Elliptic Curve Digital Signature Algorithm .
  7. The signature is valid if Elliptic Curve Digital Signature Algorithm , matches Alice's public key.
  8. The signature is invalid if all the possible R 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

Start with the definition of Elliptic Curve Digital Signature Algorithm  from recovery step 6,

    Elliptic Curve Digital Signature Algorithm 

From the definition Elliptic Curve Digital Signature Algorithm  from signing step 4,

    Elliptic Curve Digital Signature Algorithm 

Because elliptic curve scalar multiplication distributes over addition,

    Elliptic Curve Digital Signature Algorithm 

Expanding the definition of Elliptic Curve Digital Signature Algorithm  and Elliptic Curve Digital Signature Algorithm  from recovery step 5,

    Elliptic Curve Digital Signature Algorithm 

Expanding the definition of s from signature step 6,

    Elliptic Curve Digital Signature Algorithm 

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

    Elliptic Curve Digital Signature Algorithm 

The first and second terms cancel each other out,

    Elliptic Curve Digital Signature Algorithm 

From the definition of Elliptic Curve Digital Signature Algorithm , this is Alice's public key.

This shows that a correctly signed message will recover the correct public key, provided additional information was shared to uniquely calculate curve point Elliptic Curve Digital Signature Algorithm  from signature value r.

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 game console. However, this attack only worked because Sony did not properly implement the algorithm, because Elliptic Curve Digital Signature Algorithm  was static instead of random. As pointed out in the Signature generation algorithm section above, this makes Elliptic Curve Digital Signature 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.0e.

In August 2013, it was revealed that bugs in some implementations of the Java class SecureRandom sometimes generated collisions in the Elliptic Curve Digital Signature Algorithm  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:

  1. 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 missing yet.
  2. 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

Tags:

Elliptic Curve Digital Signature Algorithm Key and signature-sizeElliptic Curve Digital Signature Algorithm Signature generation algorithmElliptic Curve Digital Signature Algorithm Signature verification algorithmElliptic Curve Digital Signature Algorithm Public key recoveryElliptic Curve Digital Signature Algorithm SecurityElliptic Curve Digital Signature Algorithm ImplementationsElliptic Curve Digital Signature Algorithm Further readingElliptic Curve Digital Signature Algorithm

🔥 Trending searches on Wiki English:

José MourinhoNicholas GalitzineJimmy CarterBlockchainBruce WillisInter Miami CFJosh BrolinTejasvi SuryaOppenheimer (film)2024 Indian general election in West BengalAlexander the GreatKingdom of the Planet of the Apes2019 Indian general election in KarnatakaMaadhavi LathaCarlo AncelottiTreaty of London (1915)Jamal MurrayPansexualityXavier LegetteKorean WarMain PageKylian MbappéStripchatJesusGisele Bündchen2026 FIFA World CupAmar Singh ChamkilaJames VI and I2024 Indian general election in BiharGuy Ritchie2024 in filmChina Airlines Flight 140Animal (2023 Indian film)Bill BelichickGeorge VIGoogle MapsStellar BladeDavid Bowie2024 Andhra Pradesh Legislative Assembly electionQueens Park Rangers F.C.2019 Indian general election in Uttar PradeshSingaporeDev PatelNikola JokićTelegram (software)Steve JobsMax HollowayRathnam (film)Windows 10 version historyInterstellar (film)2014 Indian general electionThe Goat Life1983 NFL draftDonald TrumpSugar (2024 TV series)Bradley CooperRichard Armitage (actor)List of presidents of the United StatesLove Lies Bleeding (2024 film)Under the Bridge (TV series)PakistanShōgun (novel)Road House (1989 film)Nick SabanSunil NarineJeffrey EpsteinKombuchaDange (film)2024 Indian Premier League2024 AFC Futsal Asian CupTillu SquareGrey's AnatomyKalki 2898 ADMrBeastNon-fungible tokenBenjamin Netanyahu🡆 More