sokonalysis

sokonalysis logo

The Cipher Toolkit Build For All Skill Levels

About

sokonalysis from the word cryptanalysis is a cryptographic tool developed by Soko James and it seeks to decrypt encrypted messages or break cryptographic systems with or without the secret key. Meant for University Students, Capture The Flag (CTF) competitions and Organizations to apply cryptography as a field. Officially released on 8th September, 2025 and copyrighted under Kapasa Makasa University till 1st September, 2026.

Table of Content

Requirements

The file named wordlist.txt is needed for local wordlist for the hashing algorithms md5, sha1 and sha256 but if you wish to customize it, add your own text in the same text file and keep it in the same folder as the tool.

Collaborator

For every git clone command on the download option, use these commands below if you have access to the repository.

ssh-keygen -t ed25519 -C "your-email@example.com"
cat ~/.ssh/id_ed25519.pub
  1. Copy the full output (starts with ssh-ed25519).
  2. Go to GitHub → Settings → SSH and GPG keys
  3. Click “New SSH key”
  4. Paste the public key
  5. Give it a title (e.g., “sokonalysis SSH”)
  6. Click “Add SSH key”
ssh -T git@github.com
git clone git@github.com:sokonalysis/sokonalysis.git

Windows

Dependencies

MSYS2

Download MSYS2 Install MSYS2 and run the following command:

pacman -Syu
pacman -Su
pacman -S base-devel mingw-w64-x86_64-toolchain git

MSYS2 MINGW64 Terminal

pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-nlohmann-json
pacman -S mingw-w64-x86_64-gmp
pacman -S mingw-w64-x86_64-curl
pacman -S mingw-w64-x86_64-openssl
git clone https://github.com/sokonalysis/sokonalysis.git
cd sokonalysis
cd src
curl -L -o wordlist.txt https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt
pacman -S --needed make git
git clone https://github.com/weidai11/cryptopp.git
cd cryptopp
make CXX=g++ -j$(nproc)
cd ..

Build & Run

g++ -Icryptopp -std=c++17 *.cpp -lcryptopp -lssl -lcrypto -lcurl -lgmp -lgmpxx -o sokonalysis
./sokonalysis

Linux

Download

git clone https://github.com/sokonalysis/sokonalysis.git
cd sokonalysis
cd src

Virtual Environment

python3 -m venv pythonvenv
source pythonvenv/bin/activate
pip install -r requirements.txt

Requirements

sudo apt update
sudo apt install libcrypto++-dev libcrypto++-doc libcrypto++-utils
sudo apt install libcrypto++-dev libssl-dev libcurl4-openssl-dev libgmp-dev libgmpxx4ldbl g++
sudo apt install nlohmann-json3-dev
curl -L -o wordlist.txt https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt

Build & Run

g++ -I/usr/include/cryptopp -std=c++17 *.cpp -lcryptopp -lssl -lcrypto -lcurl -lgmp -lgmpxx -o sokonalysis
./sokonalysis

Image Image

Usage

Official sokonalysis YouTube Guide Playlist

  1. University Level

    University students taking Cryptography as a course can utilize option 1 – 4 to automate their work. You don’t need internet connection (except options involving APIs or external websites) to perform these tasks but just some questions you can utilize. This tool will act as an offline calculator to verify the answers after a student solves a question manually. Lets take an RSA example from Kapasa Makasa University CYS110 2025 Test 1;

    a) You have received a message UTLAIKNP encrypted with the key (33,7). Find the private keys that should be used to decrypt the message and work out the clear text.

    STEP 1
    Utilize option 8 to check the help menu and try to understand the RSA algorithm.

    Image

    STEP 2
    Based on the encryption key given (33,7), we can conclude to say that the Public Key (n,e) is n = 33 and e = 7. Now, we compute n we get the product of p and q, for which they are two large prime numbers such as 11 and 3 which gives us 33. Let’s now proceed to the RSA algorithm by selecting option 2.

    Image

    STEP 3
    Now, let’s assume as if we are encrypting a message with the given Public Key (33,7) so that we can retrive the Private Key (n,d).

    Image

    STEP 4
    There we go, we’ve obtained the Private Key (33,3). Restart the program, welcome back!!! Let’s utilize option 4 to convert the cipher text letters to numbers because the program can only decryp numerical values.

    Image

    Image

    STEP 5
    At this point we can decode the given cipher text by following the previsious steps but selecting the decryption option.

    Image

  2. CTF Level

    Cryptography is a popular category in most Capture The Flag platforms like Hack The Box (HTB), PicoCTF, CyberTalents etc.. sokonalysis can be used to solve these challenges, but with v2.2 only few algorithms are working. sokonalysis will also provide a framework that will link the user to all popular Cryptographic tools used for CTF, thereby reducing the time of finding the right tools to use.

    Image

    Let’s jump into these challenges!!!

    No Padding, no problem

    STEP 1
    Connect to the challenge server with the command nc mercury.picoctf.net 42248 in Linux or ncat mercury.picoctf.net 42248 on Windows CMD if you have Nmap - Zenmap GUI installed.

    Image

    STEP 2
    Select option 1 to view RSA options.

    Image

    STEP 3
    Select option 13 and enter the given values for n, e and c.

    Image

    STEP 4
    Give the server the modified cipher text to decrypt.

    Image

    STEP 5
    Finally, decrypt the cipher to get the flag with the new cipher text from the server.

    Image

  3. Advanced Level

Supported Algorithms

Symmetric Asymmetric Hashing Capture The Flag (CTF) Advanced Cryptography            
Caesar Cipher RSA MD5 RSA              
Transposition Cipher Diffie Hellman SHA FactorDB              
Hill Cipher   lm Substitution Cipher              
    ntlm Morse Code              
    mysql Base64 Decoder         ripemd160 ROT13  
    whirlpool ChaCha20              
      Diffie-Hellman              
      AES              

Contributors

Thanks to everyone who has contributed! Contributors