Skip to content

SanyaKor/Cryptanalysis

Repository files navigation

🔐 Lattice-Based Cryptography Project

Python Jupyter Repo Size Last Commit Build

This project provides clean and minimal implementations of key lattice-based cryptographic algorithms, including:

  • 2D Basis Reduction
  • LLL Algorithm
  • NTRU Public-Key Cryptosystem

It includes well-documented Jupyter notebooks with visualizations, usage examples, correctness tests, and exercises adapted from cryptography literature.

📦 Dependencies

This project relies on external Python libraries listed in the requirements.txt file.
To install them, use the following command:

pip install -r requirements.txt

🔗 Key Components & Notebooks

🛠️ Core Implementations: See lattice_methods
This directory contains the core Python implementations for:

  • reduce_2d_basis — basic 2D lattice reduction
  • lll_reduce — LLL lattice basis reduction algorithm
  • ntru_* — NTRU cryptosystem (keygen, encryption, decryption)
  • utility functions for validation and formatting and etc

📘 Usage Examples: See notebooks/usage_examples.ipynb
for practical demonstrations of lattice reduction functions (reduce_2d_basis, lll_reduce, etc.).

Test Cases: See notebooks/tests.ipynb
for automated tests validating correctness of the algorithms.

📝 Exercises from Literature: See notebooks/Exercises.ipynb
contains solved exercises from Introduction to Cryptography with Coding Theory (Trappe & Washington).

📚 References

About

HSMW Cryptanalysis Project Lattice Methods

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published