Skip to content

AES Encryption done in Python3 don't hate I know it's bad

Notifications You must be signed in to change notification settings

dylan-reichelt/python_aes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python_aes

An AES Encryption/Decryption program. This uses the standard 128 bit aes encryption.

Installation

Make sure you have Numpy installed. If you're unsure how to do that go here: https://scipy.org/install.html

Download the aes_encryption.py. For global imports run these commands:

python3
import sys
print(sys.path)

You should receive a path to something like:

'/usr/dylan/env/lib/python3.6/site-packages'

Drop aes_encryption.py into this. Now you should be able to import it just like anything else.

Usage

NOTE: This will automatically handle any conversions of strings, as well as the 16 byte limit of AES is handled as well within. So the text can be greater than 16bytes the encryption and decryption will handle that. The key MUST be 16 bytes however.

from aes_encryption import aes

inputText = sys.argv[1]

aesBody = aes("0123456789123456")
cypherText = aesBody.encrypt(inputText)
print("Encrypted Text: ", cypherText)
plaintext = aesBody.decrypt(cypherText)
print("Decrypted Text: ", plaintext)

Contributing

Honestly, I won't be working on this too much as it was made as a working test for my Capstone Project. However, if you wish make changes go for it and I will review them when I have time!

License

MIT

About

AES Encryption done in Python3 don't hate I know it's bad

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages