Today for AI

GitHub Trending AI · 2026/10/7 03:23:45

Ciphey 发布 Rust 版自动解码工具

出处作者 / 发布主体:bee-san原标题:⭐ bee-san/Ciphey (21662 stars)
68AI 研判分
核心综述

开源项目 Ciphey 推出基于 Rust 重写的版本,支持无需密钥或提示的自动化多层编码/加密文本解码。该工具覆盖 Base64、Vigenère 等 20+ 种常见编码格式,并提供 CLI、库及 MCP 集成方式,显著提升了安全研究与 CTF 场景下的解密效率。

报道全文原始报道全文

本文目录5 个章节

Paste in text that's been encoded or encrypted. Ciphey works out how and hands you the plaintext. No key, no cipher name, no hints. Base64, hex, Caesar/ROT13, Vigenère, Morse code and 19 more, several layers deep.

Install · Quick start · Features · Library · MCP · Docs · Discord ▶ Watch the one-minute tour (MP4, 61 s)

Install

BASH
cargo install ciphey

Prebuilt binaries for Linux (x86_64), macOS (Intel and Apple silicon) and Windows (x86_64) are on the releases page, each with a .sha256 checksum.

To build from source, you need a Rust toolchain:

BASH
git clone https://github.com/bee-san/Ciphey
cd Ciphey
cargo build --release    # the binary is target/release/ciphey

Or skip installing: join the Discord server, go to #bots and type $ciphey <your text> ($help lists the commands).

Quick start

CONSOLE
$ ciphey -t 'aGVsbG8gdGhlcmUgZ2VuZXJhbA=='
🕵️ I think the plaintext is Words.
Possible plaintext: 'hello there general' (y/N):
y

🥳 ciphey has decoded 64 times.

The plaintext is:
hello there general
the decoder used is Base64

The first time you run it, a short setup asks for a colour theme, how you want results shown and whether to use a wordlist, and saves your answers to ~/.ciphey/config.toml.

BASH
ciphey -t 'NTA3NjYzNzU3MjZjMjA3NjY2MjA2OTcyNjU2YzIwNzM2ZTY2Njc='   # ROT13 → hex → Base64, nothing else needed
ciphey -f secret.txt                    # read the input from a file
ciphey -d -t '...'                      # no y/N prompt: take the first plaintext found (handy in scripts)
ciphey -c 15 -t '...'                   # keep searching for up to 15 seconds (the default is 5)
ciphey -r 'flag\{' -t '...'             # only accept plaintext that matches a regex (a crib)
ciphey --wordlist words.txt -t '...'    # also accept any exact match from a wordlist

ciphey --help lists every option.

Features

⚡ Fast

<a href="https://cdn.jsdelivr.net/gh/bee-san/Ciphey@d41d19946234477346fede14dadf8c351cc469e6/media/tui-video/out/fast.mp4"><img src="https://cdn.jsdelivr.net/gh/bee-san/Ciphey@d41d19946234477346fede14dadf8c351cc469e6/media/tui-video/out/fast.gif" alt="A terminal runs time ciphey -d on a Base64 string. Ciphey prints 'Ciphey is very fast' and the path Base64 → Hexadecimal → caesar, and bash reports real 0m0.157s. A chart then compares Ciphey's 0.19 s (the median of 10 runs) with no answer after 60 s for Python Ciphey 5.14.0 on the same input."></a>

<sub>▶ <a href="https://cdn.jsdelivr.net/gh/bee-san/Ciphey@d41d19946234477346fede14dadf8c351cc469e6/media/tui-video/out/fast.mp4">Watch the clip</a> (16 s)</sub>

Three layers (ROT13, then hex, then Base64) come off in 0.16 s, measured by bash's time in a real recording. Here is the same comparison for more inputs, against Python Ciphey 5.14, the version Ciphey replaces:

InputCipheyPython Ciphey 5.14
Base640.11 s0.92 s
Hex → Base640.14 s1.02 s
ROT13 → Hex → Base640.19 sno answer within 60 s
URL → Base64 → Hex0.24 s1.15 s
Base64 ×40.41 s0.78 s
Hex → Base32 → Base64 → Hex0.54 s0.72 s, wrong answer
ROT13 → Hex → Base64 → Base321.15 sno answer within 60 s

<sub>Wall-clock median of 10 runs per input (Python Ciphey: 3) on a shared 16-CPU Linux machine, Ciphey at 47bd16d6 with the y/N prompt off and a fresh <code>$HOME</code> per run so its cache can't help. Every run was capped at 60 s. The script and raw numbers are in <a href="https://github.com/bee-san/Ciphey/tree/media/readme-videos/media/tui-video/bench"><code>media/tui-video/bench</code></a> on the <code>media/readme-videos</code> branch.</sub>

Where both get the right answer, Ciphey is 1.9 to 8.6 times faster. Where does the speed come from?

  • It's Rust.
  • An A* search tries the most promising chains of decoders first.
  • Every decoder runs in parallel with Rayon, on up to 10 candidate texts at a time.
  • Answers are cached in ~/.ciphey/database.sqlite, so the same input a second time comes back in milliseconds.

🧅 Layer after layer, no key needed

Ciphey doesn't need to be told what it's looking at. It searches chains of decoders (Base64 inside hex inside ROT13, four layers of Base64, and so on) and stops at the first candidate that looks like plaintext. By default it shows you that candidate and asks before accepting it (-d turns this off). The clip at the top of this page shows a four-layer decode.

There is also a timer: if Ciphey hasn't found anything after 5 seconds, it stops and says so (-c changes the limit).

It knows 24 decoders and crackers:

KindDecoders
Base encodingsBase64 (standard and URL-safe), Base32, Base58 (Bitcoin, Flickr, Monero, Ripple), Base91, Base65536, Z85
Other encodingsHexadecimal, binary, URL (percent-encoding), Morse code, Braille, A1Z26, Citrix CTX1
CiphersCaesar (including ROT13), ROT47, Atbash, Vigenère (it works out the key itself), rail fence, reversed text
OdditiesBrainfuck (it runs the program), Morse or binary written with other symbols

More are on the way: #1030 tracks 109 decoders that aren't in yet.

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)