|
This section is a pre-QnA section and It offers a new YouTube video via links. The first pre-QnA is about "How does ECDSA apply to the blockchain process?".The following is a representation of the operating logic of ECDSA and the simple Python code that applied it to the blockchain process. In the figure to the left, d in signing Logic means the private key of the signing user, and Q is the public key calculated by ECC's. k and x correspond to a temporarily created key for signing, and generate a signature through the last line of operations. The verification process is computed through the following process and is considered valid if the key value derived from the next verification process matches the key value in Signing Logic. The code on the right is a step-by-step representation of the ECDSA signature and verification process. Functions such as generatePrivKey are assumed to be pre-implemented. Lines 7 through 12 represent the Domain parameters of secp256k1. The signing logic starts at line 16 . First, private key is generated on line 16, and then the public key is obtained by computing the private key and generator generated on line 17. Line 18 is a code that hashes the public key to obtain the address of the sender's wallet. Line 19 stored the recipient's wallet address. In blockchain, the transaction corresponds to the message to be signed. Line 22 is a code that generates transactions in which the sender sends 0.01 coin to the receiver. The fee here is 0.0001 coin, and it is assumed that a large amount of coin exists in the sender's wallet. |