CipherSecurity Framework is a comprehensive assistant designed to help you solve cryptography challenges on any CTF platform. It also serves as a library containing various implementations of cryptographic and mathematical algorithms.
- Classic Encryption: Implementations of Caesar cipher, Vigenère cipher, Hill cipher, Playfair cipher, and more.
- Modern Encryption: DES, RSA, Deffie-Hellman key exchange, ElGamal encryption, and other modern cryptographic algorithms.
- Hashing: MD5, SHA-1, SHA-256, and other hashing functions.
- Encoding: Base64, Hex, etc.
- Digital Signatures: RSA, DSA, Elgmal Digital Signature implementations.
- Mathematical Algorithms: Prime number generation, modular arithmetic, GCD, and more.
- Tests: Comprehensive tests for all implemented algorithms to ensure correctness.
Make sure you have Python 3.7+ installed on your system.
Clone the repository:
git clone https://github.com/Arttacker/CipherSecurity.git
cd CipherSecurity
Install the required packages:
pip install -r requirements.txt
You can use the framework to solve cryptographic challenges or as a library in your own projects.
Example usage for a few different algorithms:
from encryption.classic import caesar
# Encrypt a message using Caesar Cipher
message = "HELLO WORLD"
shift = 3
encrypted_message = caesar.encrypt(message, shift)
print(f"Encrypted Message: {encrypted_message}")
# Decrypt a message using Caesar Cipher
decrypted_message = caesar.decrypt(encrypted_message, shift)
print(f"Decrypted Message: {decrypted_message}")
from math_algorithms.euclidean import mod_inv
# Calculate the modular inverse
a = 23
m = 26
mod_inv = mod_inv(a, m)
print(f"Modular Inverse of {a} mod {m} is {mod_inv}")
To run the tests, use the following command:
pytest
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, please reach out to [email protected].
Happy Hacking 😈!