Giter Club home page Giter Club logo

homerflander / aes-encryption-python Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 21.0 720 KB

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.

Python 100.00%
python python-3-6 aes aes-encryption aes-128 bitvector nist encryption textfile ecb

aes-encryption-python's Introduction

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 work

Summary:
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:
general


AES Encryption and Decryption Process:
aesprocess


plaintext1.txt File Contents:
plaintext1


AESencryption Folder Contents:
aesfolder


Running AESencrypt.py Script:
encrypt.py


Checking ciphertext.txt File Contents:
ciphertext


Running AESdecrypt.py Script with Wrong Passphrase:
wrong


Running AESdecrypt.py Scipt with Correct Passphrase:
right


Checking plaintext1.txt File with plaintext2.txt File:
lastcheck


Checking AESencrypt.py Script with Online AES Encrypt Tool:
lastcheck


aes-encryption-python's People

Contributors

homerflander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.