Electronic signature technology

in #signature4 years ago

Identity authentication technology is very common in life. It can be face recognition, signature, fingerprint, etc., but these methods are not safe in the field of digital currency, because once they are digitized, they can be forged by copying. So Bitcoin uses an electronic signature method.

When registering as a Bitcoin user, the system will generate a private key based on a random number, the private key will generate a public key, and the public key will generate an address. The private key must be kept secret and can be saved to the hard disk or remembered in the mind. Because this private key is the only identifier that uses the bitcoins on the corresponding address, once it is lost, all bitcoins will be unusable. The following describes the specific conversion process. If you are not interested, you can ignore it. As long as you know the process of random number -> private key -> public key -> wallet address, the private key can encrypt a string of characters, and the public key can perform it Decryption, this is asymmetric encryption. The overall functions of these algorithms are the same, but the specific algorithms are different. Since these algorithms are more complicated, they are not introduced as much as the SHA265 algorithm. If you are interested, you can learn more about the specific algorithms, but For the Bitcoin system, just understand its functions. The typical algorithm is RSA, and Bitcoin uses an elliptic curve encryption algorithm.

Conversion process (optional reading, does not affect understanding)

  1. First, use a random number generator to generate a private key, which is a 256-bit binary number. The private key cannot be made public and is equivalent to the password of a bank card.

  2. The private key uses the SECP256K1 algorithm to generate a public key. SECP256K1 is an elliptic curve encryption algorithm. Its function is similar to the RSA algorithm. A public key is generated through a known private key, but the private key cannot be deduced from the public key.

  3. Like the SHA256 algorithm, RIPEMD160 is also a HASH algorithm. The hash value of the public key can be obtained from the public key, but the public key cannot be derived from the hash value.

  4. Connect the one-byte version number to the header of the public key hash, and then perform two SHA256 operations on it, and use the first 4 bytes of the result as the check value of the public key hash and connect it at the end.

  5. Use BASE58 to encode the result of the previous step to get the wallet address (equivalent to a bank account). For example, A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
    ————————————————
    Copyright statement: This article is the original article of the CSDN blogger "Dongda Data Group Zzzcg". It follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting.

Sort:  

Thank you for the wonderful enlightenment. Your research really arose the curiosity in me showing me that I can not limit myself to what I know and as a new member, I can develop my writing skill.