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.
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.
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
ssh -T git@github.com
git clone git@github.com:sokonalysis/sokonalysis.git
Download MSYS2 Install MSYS2 and run the following command:
pacman -Syu
pacman -Su
pacman -S base-devel mingw-w64-x86_64-toolchain git
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 ..
g++ -Icryptopp -std=c++17 *.cpp -lcryptopp -lssl -lcrypto -lcurl -lgmp -lgmpxx -o sokonalysis
./sokonalysis
git clone https://github.com/sokonalysis/sokonalysis.git
cd sokonalysis
cd src
python3 -m venv pythonvenv
source pythonvenv/bin/activate
pip install -r requirements.txt
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
g++ -I/usr/include/cryptopp -std=c++17 *.cpp -lcryptopp -lssl -lcrypto -lcurl -lgmp -lgmpxx -o sokonalysis
./sokonalysis
Official sokonalysis YouTube Guide Playlist
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.
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.
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).
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.
STEP 5
At this point we can decode the given cipher text by following the previsious steps but selecting the decryption option.
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.
Let’s jump into these challenges!!!
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.
STEP 2
Select option 1 to view RSA options.
STEP 3
Select option 13 and enter the given values for n, e and c.
STEP 4
Give the server the modified cipher text to decrypt.
STEP 5
Finally, decrypt the cipher to get the flag with the new cipher text from the server.
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 |