Blockchain circle

One stop hot information platform

About us:

Blockchain circle provides the latest information about blockchain, digital currency, digital wallet, exchange, metauniverse, bitcoin, Ethereum, contract, financial management and so on, and always pays attention to the latest market...

Talk about the encryption technology of blockchain (public key and private key)

Time : 21/04/2022 Author : s3dalw Click : + -
        The blockchain is simply understood as a distributed ledger or a database. When the blockchain is studied and adopted in various industries by virtue of its unique technical characteristics, how does the blockchain protect the privacy and security of data in the face of a large amount of data? This mainly depends on cryptography. Cryptography uses advanced mathematical principles and methods to transmit and store data, which requires that only the data receiver can read and process the data. In cryptography, encryption is the core concept in cryptography. It encodes messages in a way that "no one except the receiver can decrypt", and other people cannot read and understand the data format, so as to protect data from attack.
        It is said that Caesar the great of ancient Rome was the first to use cryptography technology. He invented the "Caesar Cipher" to protect important military information. Caesar password first compiles the normal text content into a ciphertext through a set of rules, and then sends it through the communication channel. The receiver then decrypts the ciphertext with this set of rules. His method is very simple, that is to move the alphabet back several positions in turn. The specific number of moves n is the key. For example, move two, then:. If Hello is encrypted in this way, the ciphertext is jgnnq. After getting the ciphertext, move each letter forward by N positions and decrypt it.
        You can try to decrypt dmqeejckp, the key is 2. One problem with Caesar's password is that it is easy to crack, because there are only 26 possibilities (moving 27 positions is the same as moving 1 position), and it is easy to crack it by force. All you need to do is try 0-25 to see which of the "decrypted" words has a specific meaning. For example, you can crack thnpj. Symmetric encryption algorithm is an earlier encryption algorithm. In symmetric encryption algorithm, data sender and receiver use the same set of rules to encrypt and decrypt data. The simple understanding is that the encryption key and the decryption key are the same. The Caesar password mentioned above uses an encryption algorithm.
        Advantages: compared with public key encryption, the operation speed is fast. Disadvantages: key transmission problem: since the encryption and decryption of symmetric encryption use the same key, the security of symmetric encryption depends not only on the strength of the encryption algorithm itself, but also on whether the key is safely kept. When we use symmetric encryption technology to ensure the safe transmission of data, we must also share the key with the receiver. But how can we safely transmit the "key" to the receiver? Key management problem: with the increase of the number of keys, the key management problem will gradually appear. For example, when encrypting the user's information, it is impossible for all users to encrypt and decrypt with the same key. In this case, once the key is leaked, it is equivalent to disclosing the information of all users. Therefore, it is necessary to generate and manage a key for each user separately, and the cost of key management will be very high.
        Common algorithms: DES, 3DES, blowfish, idea, RC4, RC5, RC6 and AES. Asymmetric encryption refers to the encryption technology integrated into the blockchain to meet the security requirements and ownership verification requirements. The main difference between it and symmetric encryption is that symmetric encryption uses a shared key to decrypt data, while asymmetric encryption uses a "key pair" to decrypt data. The key pair consists of two parts: a public key and a private key. For example, when you transfer money to your mother's bank card, you need to know her bank card account number. Then this account number is equivalent to her public key and is publicly visible. The private key is equivalent to her password. She only knows the funds in the account without telling you the password.
        When sending data, we need to use the private key (i.e. password) and the receiver's public key (i.e. user name). The receiver decrypts the data using his private key (password) and the sender's public key (user name). The whole process is shown in the following figure:. It is worth noting that the blockchain is decentralized, and once the private key is lost, it can not be retrieved. Therefore, friends with digital assets must be cautious. Don't think that, like bank cards, they can solve the problem if they forget their passwords and bring their ID cards and related information to the bank. Advantages: it solves the security problems in key transmission disadvantages: it is impossible to verify whether the sender is correct, and the sender may have forged common algorithms: RSA and ECC (elliptic curve encryption algorithm).
        Large integer decomposition problem class: refers to using the product of two large prime numbers as the encryption number. Because of the irregularity of the appearance of prime numbers, we can only find solutions through constant trial and error. Discrete logarithm problem class: refers to an asymmetric distributed encryption algorithm based on the difficulty of solving discrete logarithm and using strong one-way hash function. Elliptic curve type: refers to the use of plane elliptic curves to calculate groups of asymmetric special values. Bitcoin uses this encryption algorithm. 1. Information encryption scenario: the information sender (marked as a) encrypts the information with the public key of the receiver (marked as b) and then sends it to B. B decrypts the information with its own private key.
        The encryption of bitcoin transactions belongs to this scenario. 2. Digital signature scenario: the sender a encrypts the information with its own private key and sends it to B. B decrypts the information with a's public key to ensure that the information is sent by A. Digital signature can ensure that the received documents are not tampered with, and can also ensure the identity of the sender. Because the private key produces a digital signature, the private key is not public. 3. Login authentication scenario: the client encrypts the login information with the private key and sends it to the server. After receiving it, the server decrypts and authenticates the login information with the public key of the client. Information encryption is public key encryption and private key decryption to ensure the security of information; Digital signature is private key encryption and public key decryption to ensure the attribution of digital signature; Login authentication private key encryption and public key decryption.
Previous:Blockchain application strengthens network trust construction
Next:No more

Related articles:

© 2005-2032 | Blockchain Circle & & All Rights Reserved    Sitemap1 Sitemap2 If there is infringement, please contact us at: