How does the AES 256 encryption work?

174 viewsOtherTechnology

I’ve heard AES256 is the best encryption system but how does it work.

I know how basic encryption work.

In: Technology

4 Answers

Anonymous 0 Comments

ELI5 may not do justice. But I’ll try.

First of all 256 bits is a lot of character combinations which makes it hard to overwhelm with brute force passwords attempts. Better than 128 or 64.

Added to this is the AES algorithm which groups the characters and swaps individual ones randomly such that it makes it very difficult for hacking tools to guess the pattern.

So yes it’s good for now. Once hacking tools get better – throwing more processing power or quantum computing at it – it will become obsolete as well.

Anonymous 0 Comments

I don’t know if there’s any ELI5 that can adequately explain AES in reality, but I might be able to cover some of the surrounding concepts of a block cipher, which AES is one of. I know you said you understand basic encryption, but I will try to write it slightly more generically for a wider audience.

Let’s say you have a message that you want to encrypt. You and the recipient have shared a secret password you want to use in advance. That password is our cipher key. With a block cipher, you generate an array of all zeroes of a predetermined fixed size in memory, and then you start loading information into it from the message. If the block gets full, you add another block to put in more of the message. You keep doing that until you have exactly enough blocks to contain the message.

The key is then used with a series of really difficult to simplify mathematical operations designed specifically to operate on the whole block at a time. AES is a symmetric cipher, which means that if instead of loading that block with the original message, you loaded the block with the same portion of the ciphered message, the output would be the original instead.

The algorithm for AES proceeds to do this again for each block, until all blocks are encrypted/decrypted. Because of the block-wise nature, the ciphered message is always an exact number of blocks in length, rather than being the exact length of the message input, which actually helps (mildly) obscure the real message even further.

I mentioned loading the block with all zeroes to start, but that’s actually not usually true. The block values are loaded via something known as an Initialization Vector (IV), which by convention starts with all zeroes for at least the first block (though it can technically be started with other values in some configurations). When the message is loaded in, it’s actually exclusive-or’d (XOR) with the values already initialized. However AES supports an operation called Cipher Block Chaining (CBC) and usually uses it by default, where the output of one block can be used to deterministically generate the IV to the next block, increasing its randomness and making successful decryption of one block dependent on the successful decryption of the prior block.

The advantage of CBC is a drastic increase in the security of the message, and a potential complete loss of decryption for any part of a message after any block that is missing. The disadvantage is that, because of the sequential nature of chaining the blocks together, you can’t effectively parallelize the encryption ~~or decryption~~, decreasing speed. (Edit: as u/spikecurtis points out, this only affects the encryption speed. I got ahead of myself there.)

Edit 2: Why is it that so many commenters in ELI***5*** treat it as “ELI25 and in a Master’s course on this topic but struggling a bit”? If the level of detail you’re delving into is not relevant to explaining at the ***lay*** level, it shouldn’t be here.

Anonymous 0 Comments

What kind of explanation are you looking for? This is pretty difficult to ELI5.

As a description of what happens with AES,

First, the message data is split into blocks of 128 bits (16 bytes) and the block is arranged in a 4 byte x 4 byte grid. Each block then goes through a repeated process which has the following steps:

* Substitution, where each byte of data is replaced with another byte from a lookup table.

* the each row of the grid is shifted by a different amount

* a matrix multiplication is performed on the grid to mix up the data between the columns

* data from the users key (which comes from the password) is mixed into the grid

This is repeated a bunch of times.

Each step is reversible, but overall very non-linear to make it difficult to perform analysis on the blocks before&after the rounds.

So this system is pretty good and there are no known non-academic weaknesses. Is it the “best”? I’m sure better systems can be made. Chacha20 is faster than AES and is considered very strong.

The big advantage of AES is that it has been in use for many years so it has been battle tested. You can be pretty confident that there are no easy exploits since none have been found in such a long amount of time.

Another thing to note is that quantum cryptography will half the security of an encryption scheme (in principle). So a 128-bit encryption scheme will become 64-bit. AES256 will reduce to a 128 strength scheme which is still very strong, so AES 256 can be considered suitable for a post quantum computer world

Anonymous 0 Comments

If we want to send something to each other and keep it secret, we both need a special lock and key system. I lock the message with a key only you can unlock. This is called end-to-end encryption. To make it work, we each have two keys: a public key and a private key. I use your public key to lock the message because only your private key can open it. When you get the message, you use your private key to unlock it. No one else can open it because they don’t have your private key. It’s like sending a locked box that only you have the magic key for. Even if someone catches the box, they can’t open it!