Encryption and decryption

Source: Internet
Author: User
Tags asymmetric encryption

1. Introduction

Encryption technology is used to encode and decode information. encoding is to translate the original readable information (also known as plaintext) into the code form (also known as ciphertext), and its inverse process is decoding (decryption ). Encryption algorithms are classified into symmetric encryption, asymmetric encryption, and irreversible encryption.

2. symmetric encryption

Symmetric encryption algorithms are an earlier encryption algorithm with mature technologies. In the symmetric encryption algorithm, the plaintext (raw data) and encryption key are processed by a Special encryption algorithm together to convert them into complex encrypted ciphertext for sending. After receiving the ciphertext, the recipient needs to use the Encrypted Key and the inverse algorithm of the same algorithm to decrypt the ciphertext to restore it to readable plaintext. In the symmetric encryption algorithm, only one key is used. Both the sender and receiver use this key to encrypt and decrypt the data. Therefore, the sender must know the encryption key in advance. Symmetric encryption algorithms are characterized by public algorithms, low computational workload, fast encryption speed, and high encryption efficiency. The disadvantage is that both parties use the same key, and the security is not guaranteed. In addition, every time users use symmetric encryption algorithms, they need to use the unique key that is not known to others. This will increase the number of keys owned by both recipients in a geometric manner, key management becomes a burden on users. Symmetric encryption algorithms are difficult to use in distributed network systems, mainly because of difficulties in key management and high usage costs. Symmetric encryption algorithms widely used in computer private network systems include des and idea. The AES proposed by the US National Bureau of Standards will replace DES as a new Standard.

3. asymmetric encryption

Asymmetric encryption algorithms use two key-public keys and private keys that are completely different but completely matched. Only a matching pair of public and private keys can be used to encrypt and decrypt files using asymmetric encryption algorithms. The public key is used to encrypt the plaintext, and the private key is used to decrypt the ciphertext. the sender (the encrypted) knows the public key of the recipient, and only the recipient (the decrypted) can decrypt the ciphertext) the only person who knows his/her private key. The basic principle of asymmetric encryption algorithms is that if the sender wants to send encrypted information that can only be interpreted by the recipient, the sender must first know the recipient's public key, then, the recipient's public key is used to encrypt the original text. After receiving the encrypted ciphertext, the recipient can use its own private key to decrypt the ciphertext. Obviously, using asymmetric encryption algorithms, the recipient must send the public key that has already been randomly generated to the sender before communication, while retaining the private key. Since asymmetric algorithms have two keys, they are particularly suitable for Data Encryption in distributed systems. The widely used asymmetric encryption algorithms include RSA and DSA proposed by the US National Bureau of Standards. Asymmetric encryption algorithms are widely used.

4. irreversible encryption

Irreversible encryption algorithms are characterized by the absence of keys during the encryption process. After the plaintext is input, the system processes the ciphertext directly through the encryption algorithm, the encrypted data cannot be decrypted. Only after the plain text is re-entered and processed by the same irreversible encryption algorithm, the same encrypted ciphertext is obtained and recognized by the system, in order to truly decrypt. Obviously, in this type of encryption process, encryption is self-encryption, and decryption is self-encryption. The so-called decryption is actually re-encryption, and the applied "password" is the input plaintext. The irreversible encryption algorithm does not have the key storage and distribution issues and is suitable for distributed network systems. However, due to the complexity of encryption computing, the workload is quite heavy. It is usually used only when the data volume is limited, for example, password encryption widely used in computer systems uses irreversible encryption algorithms. In recent years, with the continuous improvement of computer system performance, the application field of irreversible encryption is gradually increasing. Among the many irreversible encryption algorithms used in computer networks, the MD5 Algorithm invented by RSA and the irreversible encryption standard self-built (Secure Hash Standard: Safe and messy Information Standard) proposed by the National Bureau of Standards).


Note: In the next article, I will share with you various common encryption and decryption algorithms in Java!


You are welcome to join us in the discussion and study!

Collect it by yourself!

Record and share, let you grow together! Welcome to my other blog; my blog address: http://blog.csdn.net/caicongyang



Encryption and decryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.