Ciphey
⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡
Top Related Projects
RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data
A tool to analyze multi-byte xor cipher
⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡
Quick Overview
Ciphey is an automated decryption tool that uses natural language processing and artificial intelligence to crack encrypted text. It can handle various encryption methods, including modern ciphers, classical ciphers, and encodings, making it a versatile tool for cryptanalysis and CTF challenges.
Pros
- Supports a wide range of encryption methods and encodings
- Uses AI and natural language processing for efficient decryption
- Easy to use with both command-line and API interfaces
- Actively maintained and regularly updated
Cons
- May struggle with highly complex or custom encryption methods
- Requires Python 3.7+ and several dependencies
- Can be resource-intensive for large or complex inputs
- Accuracy may vary depending on the input and encryption method
Code Examples
- Basic usage with command-line interface:
from ciphey import decrypt
result = decrypt("Khoor Zruog")
print(result)
# Output: Hello World
- Using Ciphey with custom settings:
from ciphey import decrypt
result = decrypt("SGVsbG8gV29ybGQ=", config={"language": "en", "grep": "Hello"})
print(result)
# Output: Hello World
- Decrypting a file:
from ciphey import decrypt_file
result = decrypt_file("encrypted.txt")
print(result)
# Output: Decrypted content of the file
Getting Started
To get started with Ciphey, follow these steps:
-
Install Ciphey using pip:
pip install ciphey
-
Import and use Ciphey in your Python script:
from ciphey import decrypt encrypted_text = "Uif rvjdl cspxo gpy kvnqt pwfs uif mbaz eph" result = decrypt(encrypted_text) print(result)
-
Alternatively, use Ciphey from the command line:
ciphey -t "Uif rvjdl cspxo gpy kvnqt pwfs uif mbaz eph"
For more advanced usage and configuration options, refer to the official documentation on the GitHub repository.
Competitor Comparisons
RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data
Pros of RsaCtfTool
- Specialized for RSA cryptography, offering a wide range of RSA-specific attacks and tools
- Supports various input formats, including PEM, DER, and raw modulus/exponent
- Includes a comprehensive set of factorization methods and mathematical attacks
Cons of RsaCtfTool
- Limited to RSA cryptography, not suitable for other encryption types
- Requires more technical knowledge to use effectively
- May have a steeper learning curve for beginners in cryptography
Code Comparison
RsaCtfTool:
from Crypto.PublicKey import RSA
def attack(args):
tmpfile = tempfile.NamedTemporaryFile()
with open(tmpfile.name, "wb") as tmpfd:
tmpfd.write(args.publickey[0].encode("utf8"))
args.publickey = [tmpfile.name]
Ciphey:
from typing import Optional, Dict, List
@registry.register
class Caesar(Decoder[str, str]):
def decode(self, ciphertext: str) -> Optional[str]:
for i in range(26):
plaintext = self.caesar(ciphertext, i)
if self.lc.check(plaintext):
return plaintext
The code snippets show that RsaCtfTool focuses on RSA-specific operations, while Ciphey implements a more general decoding approach for various ciphers.
A tool to analyze multi-byte xor cipher
Pros of xortool
- Specialized focus on XOR cipher analysis and decryption
- Lightweight and easy to use for specific XOR-related tasks
- Includes features like known-plaintext attack and key length guessing
Cons of xortool
- Limited to XOR ciphers, unlike Ciphey's broader encryption support
- Less automated; requires more user input and decision-making
- Smaller community and less frequent updates
Code Comparison
xortool:
from xortool import xortool
xortool.main(['-c', '20', '-l', '13', 'encrypted_file'])
Ciphey:
from ciphey import decrypt
result = decrypt("encrypted_text_here")
print(result)
Key Differences
- Ciphey offers a more comprehensive approach to decryption, supporting various cipher types
- xortool is more focused and potentially faster for XOR-specific tasks
- Ciphey provides a higher level of automation, while xortool requires more user involvement
- xortool is better suited for users with specific XOR analysis needs, while Ciphey caters to a broader range of encryption challenges
Use Cases
- Choose xortool for dedicated XOR cipher analysis and when working with known-plaintext scenarios
- Opt for Ciphey when dealing with unknown encryption types or for automated decryption attempts across multiple cipher types
⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡
Pros of Ciphey
- Actively maintained with regular updates
- More comprehensive cipher detection and decryption capabilities
- Larger community and contributor base
Cons of Ciphey
- Potentially slower performance due to more extensive analysis
- May have a steeper learning curve for new users
- Requires more system resources
Code Comparison
Ciphey:
from ciphey import decrypt
from ciphey.iface import Config
text = "..."
config = Config()
result = decrypt(config, text)
print(result)
Ciphey>:
from ciphey import decryptString
text = "..."
result = decryptString(text)
print(result)
The main difference in the code is that Ciphey uses a more complex configuration system, while Ciphey> offers a simpler API with a single function call. This reflects the overall design philosophy of each project, with Ciphey providing more flexibility and options, and Ciphey> focusing on ease of use.
Both projects aim to automate the process of decrypting or decoding text, but Ciphey offers a more feature-rich experience at the cost of complexity, while Ciphey> prioritizes simplicity and quick results. The choice between the two depends on the user's specific needs and level of expertise in cryptography and programming.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Translations
ð©ðª DE
ð«ð· FR
ððº HU
ð®ð© ID
ð®ð¹ IT
ð³ð± NL
ð§ð· PT-BR
ð·ðº RU
ð¨ð³ ZH
ð¹ð TH
â¡ï¸
Documentation |
Discord |
Installation Guide
â¬
ï¸
Fully automated decryption/decoding/cracking tool using natural language processing & artificial intelligence, along with some common sense.
Installation Guide
python3 -m pip install ciphey --upgrade | docker run -it --rm remnux/ciphey | sudo port install ciphey | brew install ciphey |
Linux | Mac OS | Windows |
---|---|---|
ð¤ What is this?
Input encrypted text, get the decrypted text back.
"What type of encryption?"
That's the point. You don't know, you just know it's possibly encrypted. Ciphey will figure it out for you.
Ciphey can solve most things in 3 seconds or less.
Ciphey aims to be a tool to automate a lot of decryptions & decodings such as multiple base encodings, classical ciphers, hashes or more advanced cryptography.
If you don't know much about cryptography, or you want to quickly check the ciphertext before working on it yourself, Ciphey is for you.
The technical part. Ciphey uses a custom built artificial intelligence module (AuSearch) with a Cipher Detection Interface to approximate what something is encrypted with. And then a custom-built, customisable natural language processing Language Checker Interface, which can detect when the given text becomes plaintext.
No neural networks or bloated AI here. We only use what is fast and minimal.
And that's just the tip of the iceberg. For the full technical explanation, check out our documentation.
⨠Features
- 50+ encryptions/encodings supported such as binary, Morse code and Base64. Classical ciphers like the Caesar cipher, Affine cipher and the Vigenere cipher. Along with modern encryption like repeating-key XOR and more. For the full list, click here
- Custom Built Artificial Intelligence with Augmented Search (AuSearch) for answering the question "what encryption was used?" Resulting in decryptions taking less than 3 seconds.
- Custom built natural language processing module Ciphey can determine whether something is plaintext or not. Whether that plaintext is JSON, a CTF flag, or English, Ciphey can get it in a couple of milliseconds.
- Multi Language Support at present, only German & English (with AU, UK, CAN, USA variants).
- Supports encryptions and hashes Which the alternatives such as CyberChef Magic do not.
- C++ core Blazingly fast.
ð Ciphey vs CyberChef
ð Base64 Encoded 42 times
Name | â¡ Ciphey â¡ | ð¢ CyberChef ð¢ |
---|---|---|
Gif | ![]() |
![]() |
Time | 2 seconds | 6 seconds |
Setup |
|
|
Note The gifs may load at different times, so one may appear significantly faster than another.
A note on magic CyberChef's most similar feature to Ciphey is Magic. Magic fails instantly on this input and crashes. The only way we could force CyberChef to compete was to manually define it.
We also tested CyberChef and Ciphey with a 6gb file. Ciphey cracked it in 5 minutes and 54 seconds. CyberChef crashed before it even started.
ð Ciphey vs Katana vs CyberChef Magic
Name | â¡ Ciphey â¡ | ð¡ï¸ Katana ð¡ï¸ | ð¢ CyberChef Magic ð¢ |
---|---|---|---|
Advanced Language Checker | â | â | â |
Supports Encryptions | â | â | â |
Releases named after Dystopian themes ð | â | â | â |
Supports hashes | â | â | â |
Easy to set up | â | â | â |
Can guess what something is encrypted with | â | â | â |
Created for hackers by hackers | â | â | â |
ð¬ Getting Started
If you're having trouble with installing Ciphey, read this.
â¼ï¸ Important Links (Docs, Installation guide, Discord Support)
Installation Guide | Documentation | Discord | Docker Image (from REMnux) |
---|---|---|---|
ð Installation Guide | ð Documentation | ð¦ Discord | ð Docker Documentation |
ðââï¸Running Ciphey
There are 3 ways to run Ciphey.
- File Input
ciphey -f encrypted.txt
- Unqualified input
ciphey -- "Encrypted input"
- Normal way
ciphey -t "Encrypted input"
To get rid of the progress bars, probability table, and all the noise use the quiet mode.
ciphey -t "encrypted text here" -q
For a full list of arguments, run ciphey --help
.
âï¸ Importing Ciphey
You can import Ciphey's main and use it in your own programs and code. from Ciphey.__main__ import main
ðª Contributors
Ciphey was invented by Bee in 2008, and revived in 2019. Ciphey wouldn't be where it was today without Cyclic3 - president of UoL's Cyber Security Society.
Ciphey was revived & recreated by the Cyber Security Society for use in CTFs. If you're ever in Liverpool, consider giving a talk or sponsoring our events. Email us at cybersecurity@society.liverpoolguild.org
to find out more ð¤
Major Credit to George H for working out how we could use proper algorithms to speed up the search process. Special thanks to varghalladesign for designing the logo. Check out their other design work!
ðâ𦺠Contributing
Don't be afraid to contribute! We have many, many things you can do to help out. Each of them labelled and easily explained with examples. If you're trying to contribute but stuck, tag @bee-san â¨
Alternatively, join the Discord group and send a message there (link in contrib file) or at the top of this README as a badge.
Please read the contributing file for exact details on how to contribute â¨
By doing so, you'll get your name added to the README below and get to be apart of an ever-growing project!
ð° Financial Contributors
The contributions will be used to fund not only the future of Ciphey and its authors, but also Cyber Security Society at the University of Liverpool.
GitHub doesn't support "sponsor this project and we'll evenly distribute the money", so pick a link and we'll sort it out on our end ð¥°
⨠Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Top Related Projects
RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data
A tool to analyze multi-byte xor cipher
⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot