Foundations of Blockchain
上QQ阅读APP看书,第一时间看更新

Elliptical Curve Digital Signature Algorithm (ECDSA)

ECDSA is a digital signature algorithm that makes use of ECC to create the key pairs used in the signing and verification process of the digital signature. Because of the advantages of ECC compared to other public-key algorithms, it is commonly used in blockchain applications to sign transactions or events.

ECDSA makes use of temporary key pairs to calculate a signature pair, R and S. A temporary private key k is chosen randomly on the elliptical curve, and the corresponding public key is calculated as P = k*G. The signature is calculated as follows:

S = k-1 (Hash(m) + dA * R) mod (p)

Variables used in the signing operation are defined as follows:

  • k is the temporary private key
  • R is the x coordinate of the temporary public key
  • dA is the private key
  • m is the message
  • p is the prime order of the elliptic curve

Verification is performed in ECDSA using the R, S pair and the public key. The point P is derived as follows:

P = S-1*Hash(m)*G + S-1*R*Qa

Variables used in the verification operation are defined as follows:

  • Qa is the public key of the signer
  • m is the message
  • G is the generator point of the elliptical curve
An ECDSA digital signature algorithm is used in Bitcoin to sign transactions created by the owner by using their own private key.