For basic encryption and encoding scenarios, try Ciphey, a deep learning-based automatic text decryption algorithm.
In this paper, making github.com/Jack-Cheris… Has been included, technical articles, learning materials, a large factory interview experience, everything, welcome Star and perfect.
A, encryption,
Encryption is everywhere.
The most common ones are the ones we use every day.
Login wechat, Taobao, we use the password, is encrypted stored in the database.
Encryption technology can keep our passwords safe.
If these passwords are stored in clear text in the database, the security risk is too great.
Once the database is compromised, it’s not just about one account being stolen.
It’s likely multiple accounts were stolen at the same time.
Because a lot of people have the habit of using the same password for every major website.
However, this is 2020, password storage has already used irreversible encryption technology, such as Bcrypt encryption. At the same time, there are device locks, safety do not worry.
However, this kind of encryption algorithm is not suitable for all scenarios due to its high cost.
For less important data, low-cost encryption and encoding algorithms can be used.
Such as “soul talk” between men.
This encrypted dialogue, based on years of tacit understanding between the two people, is hard for outsiders to penetrate, no trace can be found.
But this one is different, encryption and encoding are traceable.
Today, we’re going to use Ciphey, a deep learning-based automatic text decryption algorithm, to break all of these tractable encryption and coding algorithms.
Second, the Ciphey
Ciphey is an open source algorithm that has earned 2.2k+ STAR and once appeared on Github hot list.
Try Ciphey if you don’t know how to encrypt or encode text.
Introduction to the
Ciphey supports cracking six basic encryption types:
16 codes:
Hashing is also supported, but the effect is not controllable.
It’s temporarily closed, but may reopen once it’s optimized.
Project Address:
Github.com/Ciphey/Ciph…
The principle of
Ciphey is about applying deep learning techniques to specific scenarios.
In fact, the principle is not difficult, is to classify a piece of text, determine whether it belongs to the plaintext, or which encryption method.
Output the probability of each category through SoftMax, and then start traversing the crack from high to low.
The idea is simple, but the implementation is complicated because it involves specific application domains.
You need to know how each encryption and encoding algorithm works, and how it can be cracked and decoded.
Algorithm testing
Ciphey installation is very simple, just use PIP installation:
python -m pip install -U ciphey
Copy the code
Let’s start with an easy one:
amFjayBjdWk=
Copy the code
The result of this encoding is immediately obvious to base64 users.
Use ciphey -t “amFjayBjdWk=” to decode.
This is too childish. Let’s try something harder.
3D6F57596A7447496A565861676B3263674D336267675759755232637631575A
Copy the code
This is the combination of basic encryption algorithm and coding, you can try to decrypt, feel the difficulty.
With Ciphey, it’s easy to decrypt in a second.
You can easily get the result, and you can also see what encryption and encoding algorithm is used for the string.
The options are Reverse cipher, Base64, and Base16.
And that’s exactly what I did:
Import base64 s = "Jack Cui is so handsome" print(" s) s = s[::-1] print("reverse cipher:",s) s = base64.b64encode(s.encode()).decode() print("base64:", s) s = s[::-1] print("reverse ciper:", s) s = base64.b16encode(s.encode()).decode() print("base16:", s)Copy the code
The string is first reversed, then base64 encoding is performed, the encoded result is reversed again, and finally a Base16 encoding is added.
In addition to decrypting such encrypted strings, Ciphey can also decrypt entire text.
You can run the following command to decrypt all contents in the encrypted. TXT file.
In addition, you can provide a WordList to aid in decryption.
For this kind of encryption and encoding scenario, try Ciphey, a deep learning-based automatic text decryption algorithm.
Four,
It would be nice if the hashes Ciphey supports were more stable.