Skip to content

A comprehensive framework built in Python that serves as a library containing various implementations of cryptographic and mathematical algorithms. It is also designed to help you solve cryptography challenges for any CTF platform.

License

Notifications You must be signed in to change notification settings

Arttacker/CipherSecurity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CipherSecurity Framework

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.

Features

  • 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.

Getting Started

Prerequisites

Make sure you have Python 3.7+ installed on your system.

Installation

Clone the repository:

git clone https://github.com/Arttacker/CipherSecurity.git
cd CipherSecurity

Install the required packages:

pip install -r requirements.txt

Usage

You can use the framework to solve cryptographic challenges or as a library in your own projects.

Example usage for a few different algorithms:

Classic Encryption Example: Caesar Cipher

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}")

Mathematical Algorithm Example: Modular Inverse

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}")

Running Tests

To run the tests, use the following command:

pytest

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any inquiries, please reach out to artacker404@gmail.com.


Happy Hacking 😈!

About

A comprehensive framework built in Python that serves as a library containing various implementations of cryptographic and mathematical algorithms. It is also designed to help you solve cryptography challenges for any CTF platform.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages