Skip to content

Source code for assignments completed during the Cryptography course (Semester 2026-1). Implementation of classic encryption ciphers (Caesar, Vigenère, Hill) and cryptanalysis algorithms in C and Python. FI UNAM.

Notifications You must be signed in to change notification settings

LilianaVo/Cryptography-Algorithms

 
 

Repository files navigation

Classic Cryptography Algorithms

Implementation of historical encryption ciphers for cryptanalysis study.

Python C Security

[View Code] • [Report Bug] • [Request Feature]


Overview

This repository contains the implementation and mathematical analysis of Classic Encryption Algorithms, developed to understand the foundations of modern information security.

The project explores symmetric encryption techniques, focusing on polyalphabetic and substitution ciphers. It serves as a practical study of how historical methods laid the groundwork for contemporary cryptosystems like AES and RSA.

Key Concepts Applied:

  • Modular Arithmetic: fundamental for shift ciphers like Caesar and Vigenère.
  • Linear Algebra: Matrix operations (determinants and modular inverses) applied in the Hill Cipher.
  • Bitwise Operations: XOR logic implementation for the Vernam Cipher (One-Time Pad).

Academic Context

This project was developed for the Cryptography course at the National Autonomous University of Mexico (UNAM).

Course Information Details
University Universidad Nacional Autónoma de México (UNAM)
Faculty Faculty of Engineering
Course Cryptography
Professor Dr. Alfonso Francisco De Abiega L Eglisse
Semester 2026-1
Group 02

🛠️ Implemented Algorithms

The repository includes the source code for the following ciphers, using Python for high-level logic and C for memory-efficient processing:

Algorithm Language Description Type
Caesar Cipher C Shift cipher based on modular arithmetic (x + k) mod 26. Substitution
Vigenère Cipher C Polyalphabetic substitution using a keyword to shift letters. Polyalphabetic
Hill Cipher Python Matrix-based cipher using linear algebra (K * P) mod 26. Block Cipher
Playfair Cipher Python Digraph substitution using a 5x5 key matrix. Substitution
Vernam Cipher Python The theoretical "unbreakable" cipher using XOR operations. Stream Cipher

Getting Started

Prerequisites

  • Python 3.x (for .py files)
  • GCC Compiler (for .c files)
  • NumPy (required for Hill Cipher matrix operations):
    pip install numpy
    

Compile the C file and run the executable

gcc CifradoCesar.c -o cesar
./cesar

Contributors & Development Team

  • Ileana Verónica Lee Obando
  • Luis Iván Rojas Mares

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

Source code for assignments completed during the Cryptography course (Semester 2026-1). Implementation of classic encryption ciphers (Caesar, Vigenère, Hill) and cryptanalysis algorithms in C and Python. FI UNAM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.8%
  • C 33.2%