AES in one image

A Python AES implementation. This is a project I did to learn about AES and have fun (yes I love reinventing wheels in my free time). It’s written in clean and very readable Python and is a great library for learning the implementation of Python.

Features include:

  • Rijndael cipher with 128-bit block size and 256-bit key size
  • Three modes of operation: Electronic Codebook (should not be used, only there to prove how insecure it is), Cipher Block Chaining (CBC) and Output Feedback (OFB)
  • Can be used as a library
  • Also comes with a command-line interface to encrypt and decrypt files
  • Tested correctness against NIST known AES answers
  • Clean project structure and readable code

As good as it is, I do not encourage you to use it in production because it was designed for learning and readability not for robustness and performance.

Cover image taken from Jeff Moser’s GREAT post: (A Stick Figure Guide to the Advanced Encryption Standard (AES)