Simple and easy to learn encryption

Source: Internet
Author: User

Reference: http://www.iplaysoft.com/encrypt-arithmetic.html

Http://www.360doc.com/content/14/0323/01/1355383_362832203.shtml


Getting started with simple cryptographic instances:

Send a string of text abcdef, to turn the text into a ciphertext, replace a with C, replace B with D, replace C with E, replace D with F, replace E with G, replace F with H, and finally abcdef use CDEFGH, and abcdef is the true content, And CDEFGH is encrypted ciphertext, not the real content, from the encryption process can be seen, the plaintext "ABCDEF" by the method of replacing each letter with the second letter is encrypted city "Cdefgh", here, the method of replacing each letter with the second letter is called the encryption method, Also become a cryptographic algorithm, when the content is encrypted, the recipient must also first decrypt the ciphertext, in order to understand the content, here will be ciphertext "CDEFGH" each letter replaced with the first second letter, then get the plaintext "ABCDEF".

Encryption algorithm and encryption password is not the same, know that the encryption algorithm is not much use, and can not decrypt the encrypted text. In the example above, each crossword is replaced by the second letter is the key (password), if others just know that we use the encryption algorithm is the letter substitution, but he does not know each letter is replaced by the specific letter, there is no way to restore the ciphertext, so the data encryption algorithm can be exposed, But secret keys must be kept secret can not be stolen, otherwise ciphertext will become unsafe, therefore, how to ensure the security of the key is very important.

Encryption algorithm is divided into symmetric and asymmetric encryption: Symmetric encryption both use the common key, using the secret key encryption, and then use the same key for decryption; asymmetric key, which has two keys, a key-a public key (as its name, which is a publicly available key value), One is a private key (external secrecy). When you send a message to us, use the public key to encrypt the information. Once we receive your encrypted information, we use the private key to decipher the information password.

Let's talk about some of the encryption algorithms we use a lot:

Symmetric encryption Algorithm (private key algorithm)

DES (Data Encryption Standard): DES encryption in a total of three forms, divided into DWS (40-bit length encryption), DES (56-bit length encryption) and 3DES (3 times times the 56-bit length of encryption, that is, 168-bit length encryption)   Because the 3DES encryption length is long enough, the security is high enough, so 3DES is recommended. AES (Advanced Encryption Standard): AES encryption in three different forms, divided into AES (128-bit length encryption), AES 192 (192-bit length encryption) and AES (256-BIT length encryption) AES 256 is recommended because the AES 256 encryption length is long enough and the security is high enough.

Asymmetric Encryption algorithm:

MD5 (Message Digest 5): Calculates the hash value of the 128-bit length by calculating the output of any data.

SHA-1 (Secure Hash algorithm 1): Calculates the hash value of the 160-bit length by calculating the output of any data.

Here is a detailed look at the MD5 encryption algorithm:

MD5 is a secure hashing algorithm, input two different plaintext will not get the same output value, according to the output value, can not get the original plaintext, that is, its process is irreversible; So to decrypt MD5 there is no ready-made algorithm, only with the poor lifting method, the possible clear text, with the MD5 algorithm hash, The resulting hash value and the original data form a one-to-one mapping table, through the comparison in the table than the crack cipher MD5 algorithm hash value, by matching from the mapping table to find out the original plaintext corresponding to the decryption password.

A typical application of MD5 is to generate fingerprint (fingerprints) on a message (byte string) to prevent "tampering". For example, you write a paragraph in a file called Readme.txt, and you create a MD5 value for the Readme.txt and record it, and then you can spread the file to someone else, and if someone modifies anything in the file, you'll find it when you recalculate the MD5. If there is a third-party certification body, with MD5 can also prevent the file author's "Repudiation", which is called Digital signature application.

MD5 is also widely used in encryption and decryption technology, in many operating systems, the user's password is MD5 value (or similar to other algorithms) to save the way, when the user login, the system is the user input password calculated as MD5 value, and then to the system to save the MD5 value to compare, and the system does not " Know "What the user's password is."

Digital signature: The technique of digital signature is to encrypt the digest information with the sender's private key, and send it to the receiver together with the original text. The recipient only uses the sender's public key to decrypt the encrypted digest information, and then uses the hash function to generate a summary of the received text, which is compared with the decrypted summary information. If the same, the information received is complete, not modified during transmission, otherwise the information is modified so that the digital signature verifies the integrity of the information.







Simple and easy to learn encryption

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.