Placeholder Image

字幕表 動画を再生する

  • Let's delve into a s and talk about you know what's good about it, how it works and why it was judged good enough to be the advanced encryption standard.

  • So why yes.

  • Yes, yes, but what?

  • Yeah, Why?

  • I say yes.

  • Why Buying dollars a year?

  • Have you heard offline, doll Ryan Dole?

  • No.

  • No.

  • Okay, so in that perhaps slightly infuriating way I manage should not say anything about how it works.

  • In the last video, it'll let's start with a few numbers that we briefly mentioned in the last video.

  • A s is a 128 bit symmetric block cipher.

  • That means it takes 128 bits off message on encrypted into 128 bits off cipher text.

  • We have some key.

  • Now that key cannot ever be 128 192 or 256 bits on DDE.

  • That gives you just varying amounts of security.

  • Right?

  • Form loads to ridiculously close it.

  • So don't worry about it.

  • If you if you find your brows using 128 bit, that's okay.

  • These were specified as part of A s standard.

  • So Randall had to adhere to this.

  • But I just think that we're taking 16 bites at 128 bits and we're doing something to it that turns it into some cipher text.

  • And because this is an SP network, we're gonna be doing some amount off substitution or could bring in some confusion on some amount of permutation moving things around to add diffusion you don't want just like the Enigma Machine.

  • You don't want to have one bite in one bite out, because that's gonna be easier to analyze on in.

  • Historically, of course, it is.

  • Instead of having a long line of of bites, orbits like most Cyphers might arrange things.

  • A S likes to arrange things in a grit.

  • A four by four grid 428 bit.

  • So we have our message, which is 128 bit.

  • That's 16 bites as a four by four grid.

  • Every time I try and do a grid, it always goes well.

  • So bite naught is going to be in here on bite one and bite to and by three and then 45678 column major order.

  • So actually what we're doing is we're taking our 128 bit message and we're just laying it out in this order like this on dhe.

  • Then we're going to start doing RSP network gonna commute.

  • We're gonna substitute bites and then we're gonna transform it into some way where an attacker can't read what the message used to be.

  • So there are a few different operations that A s will do but remember, But everything in a s happens on this four by four grid.

  • So what we're going to do?

  • Remember, we got the SP network, we're gonna have a substitution permutation, and we're gonna add darkie and as well at some point.

  • So this is our plain text on.

  • We're going to first bring in a part of our key on within a performing excell operation we named Member.

  • We put in all K intermediate between the rounds to battle secrecy rest.

  • The album is fully published in public.

  • Then we're going to do all round, so that's gonna be substitute bites.

  • Then we're going to shift rose on their finally, we're going to mix columns on dhe.

  • This is gonna be our substitution, and this is gonna be our permutation.

  • And finally at the end of each round, we're going toe out our ki add around key like this, and then this is going to be one around.

  • And the only thing to mention is that the mixed columns is in all around except the last one.

  • Because this permutation has no effect on the last round.

  • It just commute.

  • The output doesn't make it doesn't make any difference.

  • So it's exactly like this, except for this one, is missing on the lost ground.

  • When you've got 128 bit key, you have 10 of these rounds.

  • When you have 192 bit key, you have 12 of these rounds on.

  • When you have a 256 Vicky, you have 14 rounds.

  • But in a world of regard for exactly the same, so this is also an ex or down here add round key.

  • We don't put the same key in every time.

  • What we do is we take the original key, and as I mentioned in the SP Network video, we expand it using something called a key schedule into different round keys.

  • So visibly sort of key naught.

  • Perhaps this will be key one key to and so on, depending on which round we were in.

  • And so there'll be a key that's expanded for every round.

  • We weren't talking too much detail about the key.

  • Schedule is quite simple.

  • On effect, it's just meant to be fast.

  • Mainly it just takes your your shorter key on expands it sufficiently such that you can put it in a different rounds.

  • That's an overview of what A s does.

  • This is a much, much, much better version.

  • I mean, I can't stress this enough a much, much better version than the one I designed or showed in my SP network video.

  • We're substituting, and then we're gonna commute, and then we're gonna mix in our bounty on.

  • We're gonna do this over and over again until we have a cipher text.

  • So I guess the question then becomes what happens here, here and here off interest?

  • What's particularly nifty for me about yes, is that it doesn't use the same kind off operations that you might expect so X or, of course, happens everywhere in cryptography.

  • But actually, all of the operations within A s are essentially mathematical operations.

  • On what we would call a finite field.

  • So Dave talked a little bit about Gallo.

  • Our fields in his read Solomon video on the answer is by using Gallo our fields theory over finite feels and doing lots and lots of long divisions on traditions for a finite field or gal.

  • Our field, which are interchangeable names they What you have in the field is you have some some number of elements.

  • So let's say all the numbers between Norton 10 for example, and you have different operations, you can perform on that field.

  • So in mind are we have a gala Warfield off to to the Eight Elements.

  • And then in this field, weaken do addition, subtraction, multiplication on dhe division or extra two minus one inversion.

  • The important thing to remember about final field if we don't go any further with the math at all is that to ta elements is a bite, right?

  • So each element in this callow a field is just a bite.

  • So we start with north North Lord Lord Lord Lord, Lord Lord, we go away.

  • 211111111 And so there are 256 off these elements in this particular finite field.

  • The one take home message that you need to know about this even if you don't ever look at it again, is that whichever of these operations we do?

  • We produce another element in this field.

  • But we never leave the field.

  • We never overflow.

  • We never under flow and go into negative numbers, anything.

  • There's no float representation, anything like this.

  • If we take one of these numbers and we add them to another one, we find a different one.

  • And if we multiply them or inverse invert them or divide, we go to a different one.

  • Which makes it quite nice for imprinting a cipher because a lot of these have an opposite.

  • So, for example, addition and subtraction under each other, modification and inversion or dividing, they undo each other.

  • And we could move around this field.

  • But we never actually Levi bites.

  • If we've got our four by four by representation of our data path in A s.

  • This is our 128 big block.

  • We can perform informations on here within this final field and by the end will still be in the final field.

  • We won't have gone over to 130 bits 140 bits or somebody's officer like that.

  • It'll bring died around back.

  • And with that in mind, we will talk about what each of these does.

  • Substitute bite fats off.

  • Substitution box is literally a lookup table.

  • It's a cleverly designed lookup table.

  • Them just made this up.

  • Each bite is map to a different bite based on a function in this field.

  • But most importantly, there's a few.

  • There's a few things that they've done to try and designed it to be as complicated as possible.

  • So it's very non linear, so it's very difficult to kind of represent.

  • This is a mathematical function, exactly what it is that it does.

  • Let's just do one and then waken see So we've got our grid.

  • Let's put this here.

  • We've got our grid now drawn many times.

  • This'd be zero Mrs B one all the way up to be 15.

  • Now, what we're gonna do is we're gonna take this bite.

  • We're gonna look it up in our table.

  • We're gonna replace it with a different one, right, So are substituted.

  • Bite like that.

  • We're gonna do that individually for each of these to make this function more confusing.

  • It's been designed such that there were no fixed points.

  • That means no bite.

  • It's substituted with itself.

  • So you don't start with 15 end up with a 15 and there were no opposite fixed points, which means all the bits flip.

  • So, for example, the opposite off 1010 would be Owen Owen.

  • My ambitions for a whole byte data exist in this has been designed that way.

  • So this substitution box is really quite powerful.

  • Andi is one of the reasons why this is a really good out room, as it happens.

  • Also, it's just a lookup table.

  • So it's nice and quick, fast reversing.

  • What?

  • So we've substituted our bikes, We've taken our plain text, we put in part of our round key or this is our initial key, and then at the beginning around will make some bite.

  • Substitution is using arrest box.

  • Then we're gonna shift the rose.

  • This is really straightforward.

  • So we're just gonna take the first round, do nothing to it.

  • We'll take the second row.

  • We're gonna move it one to the left.

  • So be one go whole way back over to hear the wraparound fist move this way and this moves this way and this moves this way and this is a ghost.

  • In the end, this row moves too.

  • So this goes to hear this goes to hear this goes round back to here and so on on this moves three, which is another way of saying it was that way, but yeah, So this one goes all the way over here, this one goes over to here and so on.

  • So remember, this is going to be an intuitive process, and what we want to do is move these things around and commute them.

  • So if this is our data path with our columns by sharing bites around different columns, when we combine it with the mixed column step, which will do in a minute, you'll see the actually, we're mixing everything up.

  • So we've been just a couple of rounds.

  • Everything is very, very jumbled up, and that's a really good thing, because it's gonna be much, much harder to break.

  • So we're just taking bites and we put them in a different place in this grid.

  • So that brings us to mix columns, which goes along with this s so now that we've moved things into different columns, what we're going to do is going to take this column here and we're gonna mix.

  • He's right up.

  • We'll take this column, mixes right up on this one and this one separately.

  • So this is a column wise operation.

  • So this bite has gone over to here and then been mixed into this column.

  • This one has gone over to here and be mixed into this column.

  • So these two operations together are, you know, they're doing a good job off jumbling everything up.

  • It will be my technical way of putting it.

  • This is going to be done using the matrix multiplication.

  • So let's just turn it off.

  • Go for a lot of your paper today for some column.

  • Let's say see, naught.

  • See one C to C three.

  • We're gonna multiply as a vector by a matrix.

  • Now we've dealt with major implications occasionally, computer file.

  • We're not gonna spend too much time talking about it now, but this matrix is 23111231 1123 on dhe 3112 Now these numbers, they're big enough.

  • And jumbled enough that something interesting happens here.

  • But it's small enough.

  • This is quite fast on harder implementations and things like this.

  • If this was 50 made your album slower.

  • So if you remember from sort of linear algebra, a major modification is gonna produce another vector out.

  • So it's gonna replace his column of another one, and it's going to be a combination of all of these.

  • So this one time, this one process, one times it's one plus this one time this one plus it sometimes this one.

  • Then we repeat this process for each of the values.

  • So we're taking bits and bytes from all of these in this column, jumbling them up, moving them around Chippenham on.

  • There was a reverse inverse matrix, but does the exact opposite when you want to decrypt as well.

  • So although this is doing a good job of jumping f ing up, we can actually also undo it.

  • The only thing to mention, of course, is this is not a normal mortification in the sense that we're inside this finite field.

  • So our ad operation is an ex or on our multiplication operation is a multiplication.

  • Inside this finite field which is modular polynomial.

  • And you know, we'll sort of leave that for someone to look into.

  • All right, we'll talk about it in some extra bits.

  • So I guess, like once once more from the top, we take our plain text and we excellent with the first part of our expanded key, and then we're gonna repeat this process over and over again.

  • So we're going to substitutes and bites using our nicely designed s box.

  • We're gonna shift the rose along, and then we're gonna mix with Collins up.

  • So we're gonna suffer, shoot, and then commute our data in this grid that each time we're gonna add the round key, which in this case, is X or on We're gonna repeat this process except for the last round where we don't bother to mix the columns because it doesn't really help us.

  • I mean, at the end, we add in our final round key, and that's the end outcomes.

  • The 128 big block off total gibberish.

  • This could be described as kind of Amanda permutation.

  • That is to say, it takes some input and it performs what appears to be completely randomly producing an output when they actually obviously has had quite a lot to do with this key.

  • If you have the key, you convert, undo it.

  • Each of these steps has an exact opposite step that we could go back up food toe, undo this whole process.

  • Does this ever go wrong?

  • You mean how so?

  • Well, it just seems to be so many stages in so many hearts to it.

  • So that's a very good question, because I guess there's two answers that question wanted Technically no, because they have what we would call a test vectors, which are This is all zeroes.

  • When you put this in with this key, this is what you should get.

  • So you could test your album quite a lot before you would put it into production.

  • But in terms of sort of security issues, actually, yes.

  • Right?

  • So if you get this implementation wrong, you can kind of undermining the security of this whole cipher.

  • There have been things like caf timing attacks on side channel attacks where bits of K have been leaked because people have not given due care to how this is implemented.

  • One of many things, but I s is because it's a standard is now in CPU hardware.

  • So there are A S instructions to perform one round to perform a final round and things on and intel on Landy, Chip and all others on.

  • They are impervious to these kind of attacks on their also ridiculously fast.

  • So if you're using A s on a well equipped CPU with the right instructions, we could be talking gigabits per second of encryption, which is, you know, pretty good.

  • So that's why something like bit locker or some kind of on disk encryption you won't notice it.

  • You click a file, it's already decrypted it and shown it to you.

  • Before you consort realize what's happened on Dhe.

  • It's because of the speed of this kind of stuff.

  • What parts would talk a little bit more about Gallo our fields?

  • Because, I mean, I like the name 1st 1st of all, please look up Gala every scowl on Wikipedia because he's fascinating.

  • Didn't he die in a duel?

  • He died in a jewel, right?

  • Having published three landmark papers on final fields and polynomial and things.

  • Right?

Let's delve into a s and talk about you know what's good about it, how it works and why it was judged good enough to be the advanced encryption standard.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

AES の説明 (高度な暗号化規格) - コンピュータマニア (AES Explained (Advanced Encryption Standard) - Computerphile)

  • 2 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語