/cpp-aes

An educational implementation of the AES encryption algorithm

Primary LanguageC++

Educational AES & SHA256 Implementation

This is a work in progress!

A purely educational (NOT SECURE!) implementation of AES, favouring code readability over performance. Additionally, the SHA256 hash algorithm was implemented as well to generate keys from passwords. While SHA256 might not be the most conventional choice to generate AES Keys, it is one of the most commonly used hashing algorithms and given the educational nature of this little project I thought it was a fine choice.

Current State

  • Basic Encryption/Decryption of a arbitrary length data (not cleaned up and improved yet)
  • SHA256 Hashing of arbitrary bytes, only prototype not cleaned up yet
  • Input via command line, prototype
  • Not implemented:
    • Variable key length (only AES at this point in time)
    • No input/output capabilities, encrypted data and keys are hardcoded arrays
    • No block modes yet (Stuck in simple ECB mode so far)

Sources used