What is an ECDSA?
ECDSA (abbreviation for Elliptic Curves Digital Signature Algorithm , an algorithm for constructing digital signatures using elliptic curves) is a cryptography scheme based on elliptic curves (Elliptic Curve Cryptography or ECC).
The ECDSA algorithm uses an elliptic curve and a finite field to create a data signature so that third parties can verify the authenticity of the signature, and the signatory retains the exclusive ability to create a signature. In the case of Bitcoin, the data to be signed is a transfer of ownership.
Who developed the ECC concept and when?
The concept of cryptography based on elliptic curves was independently proposed by mathematicians Neil Koblitz and Victor S. Miller in 1985. Although their model was a breakthrough in cryptography, ECC was not widely used until the early 2000s, when Internet providers introduced it.
How is ECC used in cryptocurrencies?
Cryptography, which is the basis of cryptocurrency digital signature schemes, allows verification of transactions between two parties in a decentralized network.
ECC has a significant advantage over RSA encryption. The key size used for ECC is much smaller than the key size required for RSA. ECC provides the same level of security. Although RSA encryption is now much more widely used on the Internet, ECC is a more efficient form of RSA, which is the reason for using this cryptography in cryptocurrencies.
Who developed the ECDSA and when?
The concept of ECDSA was introduced in 1992 by Canadian mathematician and cryptographer Scott Vanstone.
What is the task of ECDSA?
Bitcoin-based technology reinterprets the concept of property rights. In the traditional sense, owning something - a house, a sum of money, etc. - means either storing (physically / legally) this object in person, or transferring it to a trusted structure (for example, a bank) for safekeeping.
In the case of bitcoin, everything is different. Bitcoins themselves are not stored either centrally or locally, no structure acts as their custodian.
Bitcoins exist as entries in the blockchain , copies of which are distributed by a network of connected computers. “Owning” bitcoin means having the ability to transfer control over it to another user by creating a transfer record in the blockchain. What makes this possible? Access to the ECDSA key pair - public and private.
ECDSA has separate procedures for signing and verification. Each procedure is an algorithm consisting of several arithmetic operations. The signature algorithm uses the private key, the verification algorithm uses the public key.
What is an elliptical curve?
An algebraically elliptic curve is represented as an equation of the following form: y2 = x3 + ax + b For a = 0 and b = 7 (the version used by bitcoin), it looks like this:
Elliptic curves have useful properties. For example, a non-vertical line intersecting a curve at two points will always intersect the third point on the curve. Another property is a non-vertical line, tangent to a curve at one point, exactly intersects another point on the curve. You can use these properties to define two operations: add a point and double a point.
To add points, P + Q = R, a line is drawn through the points P and Q, which intersects the curve at the third point R.
Then there is a point on the curve that is symmetrical to the third point R relative to the x axis. Point R and will be considered the sum of P and Q. Example:

Similarly, when doubling the point, a line is drawn tangent to the elliptic curve at the point P, which should intersect it at another point R.
The point R, symmetric to R 'about the x axis, will be considered the doubling point P. Example:

Together, these two operations are used for the product operation on the scalar, R = a P, defined as adding a point P to itself a time. For example:
R = 7P
R = P + (P + (P + (P + (P + (P + P)))))
The scalar product process is usually simplified through a combination of point addition and doubling operations.
For example:
R = 7P
R = P + 6P
R = P + 2 (3P)
R = P + 2 (P + 2P)
Here 7P is divided into two steps for doubling the point and two steps for adding the point.
What are leaf fields?
The final field in the context of ECDSA can be considered as a given range of positive numbers into which each calculation should fall. Any number outside this range is wrapped so that it falls into the range. If the result of the operation goes beyond this range, then at the end of the range, it returns to its beginning, and the calculation continues.
The simplest thing is to consider this process as the calculation of the operation "remainder from integer division", or the modulus (mod) operator. For example, 9/7 gives 1 with a remainder of 2: 9 mod 7 = 2. Here the final field is from 0 to 6, and all operations modulo 7, no matter what number they are performed, give a result that falls into this range.
How do curves combine with finite fields?
ECDSA uses elliptic curves in the context of a finite field, which significantly changes their appearance, but not fundamental formulas or special properties. The same equation presented in the graph above in the final field modulo 67 looks like this:

Now this is a set of points at which all x and y are integers between 0 and 66. At the same time, the curve still retains its horizontal symmetry.
Addition and doubling of points has now visually changed a bit. The lines drawn on this graph will wrap around the field, maintaining the same slope. Therefore, the addition of points (2, 22) and (6, 25) looks like this:

A dashed line passing through these two points ultimately abuts against the third point (47, 39), and it will be symmetrical to it with respect to the x axis (47, 28). This point is the result of the operation.
How does ECDSA work in bitcoin?
A protocol such as Bitcoin selects a set of parameters for an elliptic curve and a representation of its final field, which is fixed for all users of the protocol.
Parameters include the equation itself, the simple value of the field modulus, and the base point on the curve. The order of the base point, which is not independently selected, but is a function of other parameters, can be represented graphically as the number of additions of the point to itself until its slope becomes an infinite (vertical) line. The base point is chosen so that order is a large prime number.
For the base point of a simple module and order, bitcoin uses very large numbers. The reliability of the algorithm depends on the fact that these values are huge - this makes it impractical to use brute-force or engineering analysis.
In case of bitcoin:
Elliptic curve equation: y2 = x3 + 7
Simple module = 2256 - 232 - 29 - 28 - 27 - 26 - 24 - 1 = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F
Base point = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8
Order = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141
This implementation is known as secp256k1 and is part of a family of solutions of an elliptic curve in the field of finite fields proposed for use in cryptography.
What are the disadvantages of ECDSA?
In ECDSA, as the current signature method, bitcoin does not have native support for multi-signatures , so they are implemented using the standardized Pay-to-Script-Hash (P2SH) smart contract , which involves only script hashes in the blockchain.
This seemingly random number determines ownership of the coins. At the time of spending, the holder opens the script and the key to decrypt the hash at the same time. Then each user can use the original hash to verify the truth of the script and fulfill the conditions of the waste. However, at the same time, users must disclose all conditions of spending, including those that were not met. For example, coins can be spent if and only if Bob and Alice sign the transaction, or Alice signs it herself at the end of the week, or Bob does it, while providing a secret number.
The first problem with this model is the lack of privacy. For P2SH transactions, it is necessary that the addresses begin with the number 3. This gives blockchain analysts the opportunity to recognize all P2SH transactions on the network and determine the addresses involved in the multisignature.
The second problem is the large amount of data to process, because P2SH requires knowledge of the public keys of all multisignature participants.
Schnorr signature scheme and Taproot technology solve these problems.