https://github.com/Vincent-G-Van/AES-Encryption-Python
Two scripts in Python to encrypt/decrypt using the 128 bits AES algorithm, ECB mode with hex "00" as padding for each character. For the encryption, an ascii plaintext file is taken as the input, then an encrypted hex file is outputted. For the decryption, a ciphertext hex file is taken as the input, then a decrypted ascii file is outputted.
https://github.com/Vincent-G-Van/AES-Encryption-Python
aes aes-128 aes-decryption aes-encryption aes-encryption-python bitvector ciphertext ecb ecb-mode encryption hex nist padding plaintext python python-3-6 textfile
Last synced: 2 months ago
JSON representation
Two scripts in Python to encrypt/decrypt using the 128 bits AES algorithm, ECB mode with hex "00" as padding for each character. For the encryption, an ascii plaintext file is taken as the input, then an encrypted hex file is outputted. For the decryption, a ciphertext hex file is taken as the input, then a decrypted ascii file is outputted.
- Host: GitHub
- URL: https://github.com/Vincent-G-Van/AES-Encryption-Python
- Owner: Vincent-G-Van
- Created: 2017-06-14T08:45:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-22T06:42:11.000Z (almost 8 years ago)
- Last Synced: 2025-02-01T06:41:28.272Z (3 months ago)
- Topics: aes, aes-128, aes-decryption, aes-encryption, aes-encryption-python, bitvector, ciphertext, ecb, ecb-mode, encryption, hex, nist, padding, plaintext, python, python-3-6, textfile
- Language: Python
- Homepage:
- Size: 703 KB
- Stars: 26
- Watchers: 3
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AES-Encryption-Python (Completed/Working)
Created by Van. June 2017
Resource(s) Used:
-BitVector class created by Avinash Kak ([email protected]) at https://engineering.purdue.edu/kak/dist/BitVector-3.4.4.html
-Nist Announcement Publication of AES in 2001 at http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf
-Used Kavaliro Slides at https://kavaliro.com/wp-content/uploads/2014/03/AES.pdf to check work
-Used Online AES Encryption Tools at http://aes.online-domain-tools.com/ and http://extranet.cryptomathic.com/aescalc/index to check workSummary:
Two scripts in Python to encrypt/decrypt using the 128 bits AES algorithm, ECB mode with hex "00" as padding for each character. For the encryption, an ascii plaintext file is taken as the input, then an encrypted hex file is outputted. For the decryption, a ciphertext hex file is taken as the input, then a decrypted ascii file is outputted.Notes:
-ECB is not considered secure since it has vulnerabilities in encrypting the same plaintext block. Encrypting the same plaintext block will create the same block of ciphertext. Possible future improvement is to use a more psuedo random mode other than ECB.
--------------------Demonstration--------------------
General Overview Process:

AES Encryption and Decryption Process:

plaintext1.txt File Contents:

AESencryption Folder Contents:

Running AESencrypt.py Script:

Checking ciphertext.txt File Contents:

Running AESdecrypt.py Script with Wrong Passphrase:

Running AESdecrypt.py Scipt with Correct Passphrase:

Checking plaintext1.txt File with plaintext2.txt File:

Checking AESencrypt.py Script with Online AES Encrypt Tool:
