---
# System prepended metadata

title: Advanced Encryption Standard (AES)
tags: [DRAFT, cryptography]

---

**TL;DR** Block ciphers are able to encrypt messages or content of any size.

###### tags: `cryptography` `DRAFT`

# Advanced Encryption Standard (AES)

![](https://hackmd.io/_uploads/rk0T1W7pq.png)

![](https://hackmd.io/_uploads/Bysogb7p5.png)


# Why Block Ciphers and how they work

*by Antone King*

- [Introduction](#introduction)
- [Under the hood](#under-the-hood)
- [Where are they used](#used)
- [Attacks](#attacks)
- [Conclusion](#conclusion)
- [References](#references)


# Introduction

The goal of this post to take a semi-deep dive into the innerworkings of block ciphers and how the opperate. We will then explore some of the popular implementations such as the Advanced Encryption Standard (AES).

# Under the hood
Block Ciphers. Sounds complicated doesnt it? Well after taking some time to study them the algorithim is sort of straight forward. Lets start with a simple message and to keep things simple the message will just be the integer **1**.

They use a symmetric key and alogorithim to encrpyt and decrypt a block of data. A cipher of this sort requires an initialization vector (IV) that is added to the input plan text to increase the keyspace which make brute force attacks harder to do. The IV comes from a random generator, the random number is then combined with text in the first block and the key to ensure all subsequent blocks result in cipher text that does not match the first block.



```flow
st=>start: Message
e=>end: End
op=>operation: Block Cipher
op2=>operation: Ciphertext

st->op->op2
```

The block size refers to the number of bits can fit into a grid and are processed together. The first block cipher was DES designed by IBM in 1975 and consisted of 64-bit blocks and a 56-bit key. This block cipher is no longer considered secure due to its short key size. DES was later replaced by AES in 1998 and it uses a 128-bit block size and a 128, 196,  or 256-bit key size.



# Where are they used

- TLS
- Web Sockets
- Disk Encryption
- Banks


# Attacks

Block ciphers are only as secure as their implementations. It is important that you are using a well known random number generator, sufficiently large prime integer values and the obvious one that you do not expose your private key.

# Conclusion

Cryptography is an extremely intellectually stimulating field. It is hard to imagine that in the early interet days data was passed around in plain text with everyone with the right skill set to see. Understanding the value cryptography and those that have and are working in the field to protect sensitive data do not get enough praise. I would argue that without encryption technology would not be where it is today.

# References
[Wikipedia: Advanced Encryption Standard](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)
[Wikipedia: Block Cipher](https://en.wikipedia.org/wiki/Block_cipher)
[Wikipedia: Data Encryption Standard](https://en.wikipedia.org/wiki/Data_Encryption_Standard)