In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "what is the principle of common block chain encryption methods". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what is the principle of common block chain encryption methods" can help you solve your doubts. Let's follow the editor's ideas to learn new knowledge.
1 symmetric encryption
Principle: encrypt and decrypt data using the same key, which is suitable for encrypting and decrypting a large amount of data.
Security: the key is how the key is saved. The disclosure of the key by either party of encryption or decryption will lead to information disclosure.
Representative algorithms: DES, 3DES, Blowfish, IDEA, RC4, RC5, RC6, AES, etc.
Mathematical operations commonly used in symmetric ciphers:
* * shift and cyclic shift * *
Shift is to shift a segment of digital code to the left or right as a whole according to the specified number of digits. To move the loop to the right is to move the last shift of the number to the front of the number when moving to the right, and the loop to the left is just the opposite. For example, the result of cycling 1 bit to the right (decimal bit) for decimal 12345678 is 81234567, while the result of cycling 1 bit to the left is 23456781.
* * replacement * *
Is to replace the value of one bit in the number with another bit according to the provisions of the permutation table. It is not as orderly as the shift operation and looks disorganized. This is exactly what encryption is needed and is often used.
* * expand * *
Is to expand a piece of digital code into a digital number that is longer than the original number. There are many ways to expand. For example, the replacement method can be used to extend the permutation table to specify the alternative value of each bit of the expanded number.
* * Compression * *
Is to compress a piece of digital code into a digital number that is shorter than the original digits. There are many ways to compress. For example, the replacement method can also be used to specify the alternative value of each bit of the compressed digital code by a table.
* * XOR * *
This is a binary Boolean algebraic operation. The mathematical symbol of XOR is ⊕, and its algorithm is as follows:
1 ⊕ 1 = 0 0 ⊕ 0 = 0 1 ⊕ 0 = 1 0 ⊕ 1 = 1
It can also be simply understood that if the two digits involved in the XOR operation are equal, the result is 0 and the inequality is 1.
* * iteration * *
Iteration means repeating the same operation many times, which is often used in cryptographic algorithms to make the resulting ciphertext more difficult to crack.
2 asymmetric encryption
Principle:
Asymmetric encryption algorithms require two keys: a public key (publickey) and a private key (privatekey). The public key and the private key are a pair. If the data is encrypted with the public key, it can be decrypted only with the corresponding private key; if the data is encrypted with the private key, then it can be decrypted only with the corresponding public key.
* * Security: * * the public key can be known to anyone, but the disclosure of the private key will lead to information disclosure.
Application scenarios:
Digital signature, the private key owner encrypts the information, and the receiver uses the public key to decrypt the message successfully, then the identity of the sender can be determined.
Key length:
It is usually 1024 and 2048, etc. The length of the key is doubled, the time required for the public key operation is increased by about 4 times, the time required for the private key operation is increased by about 8 times, and the public and private key generation time is increased by about 16 times.
Length of encrypted plaintext:
The length of the encrypted plaintext cannot exceed the length of the RSA key minus 11byte. For example, the length of the key is 1024 bits, 1024 bits = 1024 bits 128 byte, 128-11=117byte, so the length of the plaintext cannot exceed 117byte. If the length exceeds this value, an exception will be thrown. The length of the encrypted ciphertext is the length of the key, for example, the length of the key is 1024bit (128Byte), and the final generated ciphertext is fixed as 1024bit (128Byte).
* * represents algorithm: * * DES, 3DES, Blowfish, IDEA, RC4, RC5, RC6, AES, etc.
3 hash hash algorithm
Principle:
Using some hash function, input plaintext of different length to get ciphertext of the same length, small changes in plaintext can cause great changes in ciphertext. In fact, the hash algorithm is not really encrypted, but generates fingerprint information corresponding to plaintext, which is used to verify the integrity of the data.
* * Security: * * plaintext cannot be pushed back through ciphertext, which is usually used as a data integrity check.
* * Application scenario 1: generate a summary of information to verify the integrity of the information
* * Application scenario 2: user passwords are not stored in clear text, such as using md5 (md5 + salt) to store passwords and verify passwords to prevent attackers from using rainbow table attacks.
* * represents algorithm: * * MD2, MD4, MD5, PANAMA, SHA-0, SHA-1, SHA-256, SHA-512, etc.
4 comparison of commonly used algorithms
After reading this, the article "what is the principle of common block chain encryption methods" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.