An educational repository providing hands-on cryptography exercises in C with OpenSSL and Python-based cryptographic attack prototypes.
Exercises for Cryptography Exam @ Polito - Cryptographic primitives in C with OpenSSL and prototype attacks in Python.
This tool is designed for students and practitioners learning cryptography by implementing cryptographic primitives and exploring attack techniques. It is ideal for those preparing for exams or seeking practical experience in cryptographic programming and exploitation.
Users should have a working knowledge of C programming and Python to fully benefit from the exercises. OpenSSL must be properly installed and configured. The repository is intended for educational purposes and does not provide production-ready cryptographic software.
Clone the repository using: git clone https://github.com/eliainnocenti/Cryptography-Exercises.git
Ensure OpenSSL development libraries are installed on your system
Compile C exercises using the provided Makefiles or gcc with OpenSSL flags
Use Python 3 environment to run Python-based attack scripts
Refer to individual exercise README files for specific build and run instructions
cd C/OpenSSL/01-random-numbers && make
Compile and run exercises for generating cryptographically secure pseudo-random numbers.
cd C/OpenSSL/02-symmetric-encryption && make
Build and test symmetric encryption implementations using OpenSSL.
python3 Python/attack_example.py
Run a Python script prototype for a cryptographic attack.
cd C/CTFs/rand && make
Compile and solve the 'Rand' CTF challenge involving bytewise operations on random strings.