Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Crypto Tool

CTF cryptography helper for common decoding and crypto challenges

Crypto Tool is a beginner-friendly CTF cryptography toolkit built to help solve common encoding, decoding, and classical cryptography challenges faster.

It is designed for CTF players who want a simple local tool for repeated crypto workflows.



Overview

Crypto Tool is a local web-based toolkit for CTF cryptography practice.

It helps with common challenge types such as:

  • Base64
  • Hex
  • Binary
  • URL encoding
  • ROT13
  • Caesar cipher
  • Morse code
  • Bacon cipher
  • Atbash
  • XOR
  • Frequency analysis
  • Simple RSA helper workflows

The goal is to make crypto challenge solving faster, cleaner, and more organized.


Why I Built It

As a CTF player, I often saw repeated crypto patterns in beginner and intermediate challenges.

Many times, solving a challenge requires testing multiple encodings, shifts, or cipher ideas quickly.

I built Crypto Tool to make that process easier.

Instead of switching between many websites or writing the same scripts again and again, I wanted one local tool that helps me test common ideas faster.

This project helped me improve in:

  • cryptography basics
  • CTF workflow
  • Python scripting
  • Streamlit UI
  • tool design
  • problem decomposition
  • security-minded thinking

The Problem

CTF crypto challenges often require many small tests.

ProblemExample
Repeated decodingBase64, Hex, Binary, URL
Unknown Caesar shiftNeed to try all 26 shifts
XOR guessingNeed quick XOR helpers
Classical ciphersAtbash, Bacon, Morse, ROT13
RSA practiceNeed simple helper logic for weak/small RSA cases
Workflow frictionToo many separate tools and websites

Crypto Tool reduces that friction by putting common helpers in one place.


Features

FeatureDescription
Base64 decoderDecode Base64 strings
Hex decoderConvert hex to text
Binary decoderConvert binary to text
URL decoderDecode URL-encoded strings
ROT13 helperDecode ROT13 text
Caesar solverTry Caesar shifts automatically
Morse decoderDecode Morse code
Bacon cipher helperWork with Bacon-style encodings
Atbash helperDecode Atbash cipher text
XOR toolsHelp test XOR-based challenge ideas
Frequency analysisAnalyze character frequency in ciphertext
RSA helperPractice weak/small RSA-style CTF cases
Streamlit UIRun as a local web app
Testable logicIncludes reusable helper functions and tests

Tool Architecture

flowchart TD
U[CTF Player] --> UI[Streamlit Web UI]
UI --> INPUT[Input Text / Ciphertext]
INPUT --> ROUTER[Tool Selector]
ROUTER --> DEC[Encoding Decoders]
ROUTER --> CLASSIC[Classical Cipher Helpers]
ROUTER --> XOR[XOR Tools]
ROUTER --> FREQ[Frequency Analysis]
ROUTER --> RSA[RSA Helper]
DEC --> OUT[Result Output]
CLASSIC --> OUT
XOR --> OUT
FREQ --> OUT
RSA --> OUT
OUT --> U
Loading

CTF Workflow

Crypto Tool is designed around a common CTF solving process:

Ciphertext
↓
Try common encodings
↓
Try classical ciphers
↓
Check patterns / frequency
↓
Try XOR or RSA helpers if needed
↓
Extract flag or useful clue

Example:

Input:
Uryyb Jbeyq
Tool:
ROT13
Output:
Hello World

Supported Challenge Types

CategoryTools
EncodingBase64, Hex, Binary, URL
Classical ciphersROT13, Caesar, Atbash, Bacon, Morse
XORXOR helper utilities
AnalysisFrequency analysis
RSASmall/weak RSA helper workflows
CTF utilityFast local testing and result output

Tech Stack

AreaTools
LanguagePython
UIStreamlit
Security DomainCryptography / CTF
TestingPython tests
App TypeLocal web toolkit

Project Structure

Crypto-tool/
├── app.py
├── crypto_tools/
│ ├── encodings.py
│ ├── classical.py
│ ├── xor.py
│ ├── rsa.py
│ └── analysis.py
├── tests/
│ └── test_crypto_tools.py
├── requirements.txt
└── README.md

Folder names may vary depending on the current version of the project.


Quick Start

Clone the repository:

git clone https://github.com/BeBecpp/Crypto-tool.git
cd Crypto-tool

Install dependencies:

pip install -r requirements.txt

Run the app:

streamlit run app.py

Open the local Streamlit URL shown in the terminal.

Usually:

http://localhost:8501

Example Use Cases

Base64 Decode

Input:
SGVsbG8gQ1RG
Output:
Hello CTF

Caesar Shift

Input:
khoor
Possible output:
hello

Morse Code

Input:
.... . .-.. .-.. ---
Output:
HELLO

Atbash

Input:
svool
Output:
hello

Why This Matters for CTF

Crypto Tool is not meant to replace learning.

It is meant to support faster experimentation.

In CTFs, speed matters. A small helper tool can make it easier to test ideas, compare outputs, and move from guessing to solving.

This project also helps me understand crypto concepts more deeply because I build the tools instead of only using online decoders.


What I Learned

While building Crypto Tool, I learned that useful security tools should be simple, fast, and clear.

The hardest parts were:

  • organizing many small crypto helpers
  • making outputs easy to compare
  • handling invalid input safely
  • writing reusable functions
  • thinking like a CTF solver
  • building a tool that supports learning instead of hiding it

This project improved my cybersecurity mindset and helped me practice problem-solving under CTF-style pressure.


Current Limitations

LimitationFuture Fix
Beginner/intermediate focusAdd more advanced crypto attacks
RSA helper is limitedAdd more RSA attack patterns
No automatic detection yetAdd smart encoding/cipher guesser
UI can be improvedAdd cleaner workflow layout
No flag pattern detectorAdd common flag format detection
Limited explanationsAdd educational notes for each cipher

Future Improvements

  • Auto-detect possible encodings
  • Add Vigenere helper
  • Add affine cipher solver
  • Add substitution cipher tools
  • Add RSA attack modules
  • Add flag format detector
  • Add exportable solve notes
  • Add challenge workspace history
  • Add educational explanations
  • Add more tests

Portfolio Summary

Crypto Tool is a CTF-focused cryptography toolkit built with Python and Streamlit.

It demonstrates:

  • cybersecurity interest
  • cryptography fundamentals
  • CTF problem-solving workflow
  • Python tool development
  • reusable helper design
  • local web app development
  • security-minded experimentation

This project represents my interest in learning cybersecurity by building tools and solving real challenges.

Build tools. Solve challenges. Learn by doing.

About

my first crypto tool

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages