djibril-coulybaly / Advanced-Security

Implemented various encryption/decryption, number theory and cryptographic applications made using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advanced Security

📔 Table of Contents


Introduction

Implemented various encryption/decryption, number theory and cryptographic applications made using Python


🔐 Applications

1️⃣ AES Algorithm

Symmetrical block cipher algorithm that takes plain text in blocks of 128 bits and converts them to ciphertext using keys of 128, 192, and 256 bits.

2️⃣ Caesar Cipher

Uses a substitution method where letters in the alphabet are shifted by some fixed number of spaces to yield an encoding alphabet

3️⃣ Calculator

Calculator which is able to perform the following arithmetic:

  • Addition
  • Subtraction
  • Division
  • Multiplication

The calculator has a GUI (Graphical User Interface) for ease of use

4️⃣ Hill Cipher

  • Polygraphic substitution cipher based on linear algebra
  • Keyword and plaintext turned into key matrix and column vector
  • Matrix multiplication modulo the length of the alphabet (i.e. 26) is performed on each vector
  • These vectors are then converted back into letters to produce the ciphertext

5️⃣ Letter Frequency Attack on Mono-Alphabetic Substitution Cipher

  • Frequency analysis is one of the known ciphertext attacks. It is based on the study of the frequency of letters or groups of letters in a ciphertext
  • Find the difference between i-th maximum occurring letter in the given string and the string T and then shift all the letters of the given string with that difference
  • The string obtained will be one of the possible decrypted strings.

6️⃣ Miller-Rabin Algorithm

Determines whether a given number is likely to be prime

7️⃣ Vigeneré Cipher

  • Type of polyalphabetic substitution cipher
  • Cipher alphabet is changed regularly during the encryption process, making it less vulnerable to cryptanalysis.

🧰 Getting Started

To set up the database:

  1. Open a new command prompt window

  2. Redirect to the location of the python file you wish to run

  3. Type the following command and press Enter:

    python3 name_of_application.py

📁 Directory Structure

|-- AES Algorithm (Key Expansion)
|   '-- keyExpansionAES.py
|-- Caesar Cipher
|   '-- caesar_cipher.py
|-- Calculator
|   '-- CalculatorApp.py
|-- Hill Cipher
|   '-- main.py
|-- Letter Frequency Attack on Mono-Alphabetic Substitution Cipher
|   '-- main.py
|-- Miller-Rabin Algorithm
|   '-- millerRabinAlgorithm.py
|-- Vigeneré Cipher
|   |-- test.py
|   '-- vigenere_cipher.py

About

Implemented various encryption/decryption, number theory and cryptographic applications made using Python


Languages

Language:Python 100.0%