Giter Site home page Giter Site logo

aes-and-text-based-aes's Introduction

AES-and-Text-Based-AES

Implementations of the real AES cipher and my Text-Based AES cipher in C#

These implementations were created for my YouTube channel "Cryptography for everybody" for the creation of my AES videos to refresh my understanding of the details of AES.

My YouTube channel: https://www.youtube.com/c/CrypTool2/ My blog: https://www.kopaldev.de Another repository with source code in C# for a console application which allows file encryption using AES and a password: https://github.com/n1k0m0/FileCrypt

AES

Implementation of the Advanced Encryption Standard (AES). For details on AES/Rijndael, see

  • Daemen, Joan; Rijmen, Vincent (2002). The Design of Rijndael: AES โ€“ The Advanced Encryption Standard. Springer. ISBN 978-3-540-42580-9.

The purpose of this implementation is to make it as easily as possible to understand AES. Thus, we tried to create only easy to read implementations of the primitives. Also, there is no further speed optimization with lookup tables for the Galois arithmetic being the exception. Finally, there are no special security measures like protecting keys in memory or measures against side channel attacks. Thus, this implementation should be only used for educational purposes and NOT for any security purposes!

Text-Based AES

"Crazy AES-like cipher" that only works on text data (Latin Alphabet A-Z) The structure of the cipher is based on the same structure of AES with some changes:

  • The S-Box is a bigram substitution (randomly created fixed table) instead of a byte-based substitution
  • XOR-ing the keys is replaced by a shift cipher (just adds and subtracts the roundkeys)
  • ShiftRows is exactly the same as with original AES
  • MixColumns is replaced by a Hill cipher (still matrix multiplication :-)), we use the "original" matrix for encryption
  • KeyExpansion is exchanged completely (uses ShiftRows, MixColumns, and round constants from AAAA-ZAAA to expand the key)
  • We also perform 10 rounds like AES-128
  • We define the mapping from letters to numbers as: A=0, B=1, C=2, ..., Z=25

aes-and-text-based-aes's People

Contributors

n1k0m0 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

agnesa321

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.