Skip to content

dancpluz/aes-rsa-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š About

This repository contains the final project implementation for the Cybersecurity (CIC0201) course at the University of BrasΓ­lia (UnB). Developed during my 6th semester in Computer Science, the project focuses on creating cryptographic tools and exploring their fundamental principles.

The project is divided into two main parts: one for symmetric cryptography and one for asymmetric cryptography with digital signatures. By implementing the AES and RSA algorithms, I was able to deepen my understanding of how the theory behind data security is applied in practice, from block encryption to key generation and digital signature verification.

This experience was crucial for solidifying my knowledge of topics such as modes of operation, data integrity, and authentication, demonstrating the power of these tools to protect information in a digital environment.

πŸ“Œ Features

Symmetric Cryptography (AES-CTR/GCM)

  • AES Block Cipher: Implementation of the AES block cipher with 128-bit key and block sizes.
  • CTR Mode of Operation: Use of Counter Mode (CTR) to encrypt and decrypt files of any size.
  • Authenticated GCM Mode: An extra implementation of Galois/Counter Mode (GCM) to ensure data authenticity and integrity.
  • Visual Tests: Encryption of a picture (selfie.jpg) with varying numbers of AES rounds to demonstrate the algorithm's effect.

Asymmetric Cryptography and Digital Signatures (RSA)

  • RSA Key Generation: Creation of public and private keys with primes of 1024 bits or more.
  • RSA Encryption/Decryption: Implementation of the asymmetric encryption and decryption processes.
  • Digital Signature: SHA-3 hash calculation and creation of a digital signature for a document.
  • Signature Verification: The process of verifying signed documents for authenticity.

πŸ›  Built With

  • Language: Python
  • Algorithms: AES, RSA, SHA-3
  • Libraries: hashlib, PIL (Pillow)

πŸ‘¨β€πŸ’» How to Run

Prerequisites

Make sure you have Python 3 installed.

Installing Dependencies

Install the necessary libraries using pip:

pip install Pillow
pip install cryptography

(The hashlib and os libraries come pre-installed with standard Python.)

Usage Instructions

The scripts are modular and can be run separately. The necessary files for the tests are located in the AES/arquivos/ and RSA/arquivos/ folders.

Example of how to run the test scripts:

python AES/aes_test.py
python RSA/rsa_test.py

πŸ‘₯ Author

This project was developed by:

🀝 Contributions / Acknowledgements

This project was carried out for the Cybersecurity course in the Computer Science Department at the University of BrasΓ­lia (UnB).

Click to view status
  • Implementation of the AES cipher (128 bits).
  • Implementation of CTR mode of operation.
  • Implementation of the RSA asymmetric cipher (1024+ bits).
  • Implementation of Digital Signatures.
  • Generation and verification of SHA-3 hashes.

About

πŸ” An implementation of AES-CTR and RSA with Digital Signatures for an academic Cybersecurity project.

Topics

Resources

Stars

Watchers

Forks

Contributors