Skip to content

BeBecpp/Crypto-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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.

Problem Example
Repeated decoding Base64, Hex, Binary, URL
Unknown Caesar shift Need to try all 26 shifts
XOR guessing Need quick XOR helpers
Classical ciphers Atbash, Bacon, Morse, ROT13
RSA practice Need simple helper logic for weak/small RSA cases
Workflow friction Too many separate tools and websites

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


Features

Feature Description
Base64 decoder Decode Base64 strings
Hex decoder Convert hex to text
Binary decoder Convert binary to text
URL decoder Decode URL-encoded strings
ROT13 helper Decode ROT13 text
Caesar solver Try Caesar shifts automatically
Morse decoder Decode Morse code
Bacon cipher helper Work with Bacon-style encodings
Atbash helper Decode Atbash cipher text
XOR tools Help test XOR-based challenge ideas
Frequency analysis Analyze character frequency in ciphertext
RSA helper Practice weak/small RSA-style CTF cases
Streamlit UI Run as a local web app
Testable logic Includes 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

Category Tools
Encoding Base64, Hex, Binary, URL
Classical ciphers ROT13, Caesar, Atbash, Bacon, Morse
XOR XOR helper utilities
Analysis Frequency analysis
RSA Small/weak RSA helper workflows
CTF utility Fast local testing and result output

Tech Stack

Area Tools
Language Python
UI Streamlit
Security Domain Cryptography / CTF
Testing Python tests
App Type Local 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

Limitation Future Fix
Beginner/intermediate focus Add more advanced crypto attacks
RSA helper is limited Add more RSA attack patterns
No automatic detection yet Add smart encoding/cipher guesser
UI can be improved Add cleaner workflow layout
No flag pattern detector Add common flag format detection
Limited explanations Add 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

Watchers

Forks

Releases

Packages

Contributors

Languages