Writing to cainiao-Principles of reversible and irreversible encryption and decryption algorithms

Source: Internet
Author: User

Comments: Currently, many website passwords are encrypted using the MD5 method, which is irreversible. Therefore, it is impossible to restore the encrypted passwords based on the ciphertext. Here, the conversion process from plaintext to MD5 ciphertext is set as a function, f (x), and only one y = f (x) corresponds to any x, for any y = f (x) only one unique x can obtain f (x) = y. The 16-bit MD5 algorithm is f ("917") = & quo. Currently, many website passwords are encrypted in the MD5 mode. MD5 is an irreversible operation. Therefore, it is impossible to restore the encryption based on the password after encryption.
Here, the conversion process from plaintext to MD5 ciphertext is set as a function, f (x), and only one y = f (x) corresponds to any x, for any y = f (x) only one unique x can obtain f (x) = y. The 16-bit MD5 algorithm is f ("917") = "d2dc5d489242e60e ". Because the operation is irreversible, there is no unified algorithm g (y) = x, but you get "917" through "d2dc5d489242e60e ".
If the password you registered in a system is "917", for security reasons, the system leaves "d2dc5d489242e60e" instead of plain text ". For example, if you submit "917" to the system during this logon, the system uses f ("917") to verify whether it is equal to "d2dc5d489242e60e" saved in the system ". If they are equal, the login is successful. If they are not equal, the login fails.
You can obtain the "d2dc5d489242e60e" stored in the system through various methods. The only option at this time is to enumerate (list one by one) the possible plaintext through f (x) within the valid range) check whether it is equal to "d2dc5d489242e60e ". The advantage of a computer is its fast computing speed and high computing accuracy, which can enumerate tens of thousands or even higher per second. For example, you can let the computer cyclically enumerate from 0 to 999. When it reaches 917, it will get the same ciphertext as the above example, and it will prove that the plaintext is "917 ". Specify the range of all characters allowed by the computer. Theoretically, all passwords can be cracked in plain text, but only in time (a complicated password may need to be cracked by the attacker for N centuries, however, an 8-digit pure number or common word may only take N seconds for the computer ). Although the database is not so easy to leak and be attacked, the security awareness must be enhanced and the password strength should be large enough.
In many cases, we need reversible algorithms for encryption. For example, if we send an email, it may be intercepted and leaked by various methods during the process of sending the desired file. This is a reversible algorithm. Assume that a simple algorithm is y = f (x, m) and x = g (y, n ). The sender uses f (x, m) and the receiver uses g (y, n ). M and n are the "keys" of both parties ". If m = 1, n = 2, y = f ("see you on the bridge at p.m.", 1) = "have you eaten? "; X = g (" have you eaten? ", 2) =" see you on the bridge ". At this time, the sender only sends "Have you eaten?" based on his y = f (x, m ?" To the recipient, even if it is intercepted on the road, nothing is disclosed. The receiver uses its own unique x = g (y, n) to get y = "Have you eaten ?" And your own key to easily get x = "see you on the bridge ".

Related Article

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.