AES Encryption 2: AddRoundKey, SubBytes and ShiftRows

  Рет қаралды 76,224

Creel

Creel

Күн бұрын

In this vid we'll fill out the bodies to three of the steps in AES. These three steps are AddRoundKey, SubBytes and ShiftRows. The remaining steps to AES are rather fiddly, MixColumns and ExpandKey, so we'll look at those separately.
I've also taken the opportunity to introduce Galois fields for the AddRoundKey section. AddRoundKey is really just a matter of performing XOR, but it helps to understand Galois fields before we come to the MixColumns step.
Link to the S_Box on Wikipedia:
en.wikipedia.o...
Link to the Finite Field/Galois Field Wikipedia page:
en.wikipedia.o...
Become a patron and support What's a Creel programming vids on Patreon:
www.patreon.com/whatsacreel
FaceBook:
pages/WhatsaCreel/167732956665435

Пікірлер: 58
@Cubinator73
@Cubinator73 9 жыл бұрын
I like how you explain this _AddRoundKey_ thing and it just comes out to be an XOR operation :D
@majoro7251
@majoro7251 8 жыл бұрын
Yep! xD
@oler2322
@oler2322 6 жыл бұрын
To be honest, this is probably one of the best and easiest coding video I've ever seen. Thank you!
@MrGreeneyes77
@MrGreeneyes77 8 жыл бұрын
Utterly fantastic video(s)! It's so rare to find something this well done by a native english speaker!
@nomen385
@nomen385 4 жыл бұрын
Ikr...always d indians doing it
@JOBEEHUSTLER
@JOBEEHUSTLER 6 жыл бұрын
Thank you for making me understand this so clearly.
@ImmortalSoul52
@ImmortalSoul52 2 жыл бұрын
You sir, are a lifesaver and legend!!
@bakkasur9614
@bakkasur9614 6 жыл бұрын
i am loving these "Short stories long!" @19:29....Thanks alot! you should do more cryptograph stuff. you make it look easy.
@sethrigney5978
@sethrigney5978 3 жыл бұрын
This is very helpful. It's hard programming in college when your hobby isn't writing programs. I end up having to revive my programming experience after months or a year of not writing any programs lol. I am not even in computer science but it is required for my cyber security degree :(
@SphereofTime
@SphereofTime 10 ай бұрын
5:59
@Marshalldsfs
@Marshalldsfs 5 жыл бұрын
Thank you for sharing this, feel it's very usefully
@WhatsACreel
@WhatsACreel 5 жыл бұрын
You're welcome, cheers for watching :)
@reshabprasad6793
@reshabprasad6793 8 жыл бұрын
Can u provide us a full source code of this above AES explanation?
@timgerard262
@timgerard262 4 жыл бұрын
G'day mate, from the USA!
@WhatsACreel
@WhatsACreel 4 жыл бұрын
G'day mate, from Oz :)
@greenarthur6602
@greenarthur6602 3 жыл бұрын
can someone please explain to me on why he is using pointers on his parameters for for the steps?? I dont get it??????
@neevpenkar4955
@neevpenkar4955 3 жыл бұрын
Dear Creel, why are the bytes arranged as 0, 4, 8, 12, and not as 0, 1, 2, 3? In essence, why have you taken them as column vectors and not as row vectors? At least for me, it is somehow more intuitive to have them arranged horizontally. Is AES just programmed that way?
@AudicyVEVO
@AudicyVEVO 4 жыл бұрын
"In case you were doing AES by hand, which you would never do." Me: god I hate my professor for making me do it by hand
@yungjoshx
@yungjoshx 3 жыл бұрын
same this shit sucks man
@theresatobollik2382
@theresatobollik2382 5 жыл бұрын
Thank you so much. So well explained.
@Anonymous-pr3gr
@Anonymous-pr3gr 6 жыл бұрын
Honestly, the wiki page makes it way more complicated than it actually is. Although, i am so happy to know how to operate on bytes now (not that it's hard) cuz i was doing some ciphers before directly on the text. It has terrible.
@abbasssharara2393
@abbasssharara2393 6 жыл бұрын
if anyone want to create those instruction he wrote for shift rows as a loop here it is: char tmp; int j = 0; int i = 0; for ( i = 1; i
@eman548
@eman548 5 жыл бұрын
what is the initial value of Roundkey in its function ?
@bhalsodnirva104
@bhalsodnirva104 4 жыл бұрын
Can you share a link for the code?
@zainabayub8025
@zainabayub8025 7 жыл бұрын
can anybody gives me link of s-box genrated how specifically that s-box of hexa num can be created . I wanted to know those values like E3 6C and bla bla words put in that table
@ammisaid8273
@ammisaid8273 6 жыл бұрын
GALELOIO FIELDS IS COOOOOL !!!!!!
@mrclipent3708
@mrclipent3708 4 жыл бұрын
So you at 18:00 , you're doing the AND operation and not the XOR operation?
@WhatsACreel
@WhatsACreel 4 жыл бұрын
It's XOR. Adding the bits without recording the carry. It's the same as asking if the bits are not equal. If they're not equal, record a 1, otherwise record 0. Hope this helps, cheers for watching :)
@chigoziea.991
@chigoziea.991 5 жыл бұрын
Can't understand how they match at the AddRoundKey step :P.
@xRockbandObsessionx
@xRockbandObsessionx 5 жыл бұрын
So do you use 16 inside all of your arrays because your key is 16 bytes? Also, for 256 instead of 128, would it become 32 bytes and the key array consist of 32 numbers? Great videos :) Thanks!
@IamNotNewHere
@IamNotNewHere 5 жыл бұрын
thank you so much!
@nlkhoshiro
@nlkhoshiro 7 жыл бұрын
thank you an amazing video!
@sree6119
@sree6119 4 жыл бұрын
Which software you have used ..is that python or visual studio??
@marcosdaniel4237
@marcosdaniel4237 8 жыл бұрын
Could you make the file available?
@yashbansal7205
@yashbansal7205 7 жыл бұрын
when you are using subbytes state[i]=s_box[state[i]] here state[i] is a character so how can you pass it in s box parameter
@creelsmusic5814
@creelsmusic5814 7 жыл бұрын
It's not a parameter, more like an array index. We're swapping state[i] for the value in the s box with the same number. So if state[i] is 10, then it will be swapped with whatever is in the s box at the 10th position.
@yashbansal5655
@yashbansal5655 7 жыл бұрын
Creel's Music but you have copied message in state so it can also contain letter like 'T' so than which value og sbox will it take.
@creelsmusic5814
@creelsmusic5814 7 жыл бұрын
'T' is just a number. It's really the ASCII number of the character. 'T' has ASCII of 84, so it would be swapped with whatever is at the index 84 in the s box
@asdfg2466
@asdfg2466 8 жыл бұрын
Is the code or the program uploaded somewhere?
@roykimor
@roykimor 9 жыл бұрын
I always feel stupid when it comes to cryptography, I can implement any cryptography given instruction, but understanding why it does what it does and how it makes it secure enough to be a "standard", is beyond my understanding and I can't find good explanation for it. So regarding to what I said, mind answering these question about AES ?
@INT41O
@INT41O 9 жыл бұрын
+Roy Mor it's all about confusion and diffusion: en.wikipedia.org/wiki/Confusion_and_diffusion SubBytes corresponds to confusion, the rest to diffusion i think
@JensHove
@JensHove 7 жыл бұрын
A loop to move 16 bytes. Can't you make a Move(Source,Dest,SizeOf(Source)) in C#??
@ElementzDiMetaphysics98
@ElementzDiMetaphysics98 Жыл бұрын
I typed the whole entire S-Box out lol hahaha
@Shan-gn7mg
@Shan-gn7mg 7 жыл бұрын
I like your accent xD
@hassan4834
@hassan4834 7 жыл бұрын
could you please provide the source code of aes 128 bit.
@WhatsACreel
@WhatsACreel 7 жыл бұрын
Sorry mate, I don't have a working website at the moment. Also, a recent crash lost most of the sources from these vids. Good luck, have a good one!
@hassan4834
@hassan4834 7 жыл бұрын
OK no worries. btw you have done a great job thank you :)
@건강나라-f3v
@건강나라-f3v 6 жыл бұрын
awsome
@churchboy2334
@churchboy2334 9 ай бұрын
where is the source code. please push it to your github repository
@douwehuysmans5959
@douwehuysmans5959 6 жыл бұрын
Please indent the code :/
@faythaan7056
@faythaan7056 4 жыл бұрын
my code won't run T_T
@WhatsACreel
@WhatsACreel 4 жыл бұрын
Tell me about it! Mine breaks too. Well, just gotta keep on keeping on mate. Step through, check everything... Debugging is hard! Hope you can track down the problem mate. Thanks for watching :)
@farrasmuttaqin9091
@farrasmuttaqin9091 5 жыл бұрын
please implement in android studio
@chimpionboy
@chimpionboy 7 жыл бұрын
About the chess game hope I would like to beat the crap out it . lol just kidding I don't have a clue about chess game.
@WhatsACreel
@WhatsACreel 7 жыл бұрын
I love chess, I am terrible at it though. I'd like to make an engine, but at the moment, there is no chance. Anywho, thanks for watching, have a good one!
@WhatsACreel
@WhatsACreel 7 жыл бұрын
PS. I just watched your vids, your accent is amazing dude!
@MrPlayermacik
@MrPlayermacik 6 жыл бұрын
amazing video, thank you!
AES Encryption 1: Intro and Outline
16:23
Creel
Рет қаралды 86 М.
AES Encryption 3: MixColumns 1 Dot Products
38:16
Creel
Рет қаралды 55 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Assembly Language Misconceptions
18:13
Creel
Рет қаралды 105 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 585 М.
AES Explained (Advanced Encryption Standard) - Computerphile
14:14
Computerphile
Рет қаралды 1,3 МЛН
How does AES encryption work? Advanced Encryption Standard
12:50
Programming w/ Professor Sluiter
Рет қаралды 114 М.
Top 10 Craziest Assembly Language Instructions
15:19
Creel
Рет қаралды 464 М.
AES: Advanced Encryption Standard - a Conceptual Review
16:12
Gideon Samid
Рет қаралды 139 М.
What P vs NP is actually about
17:58
Polylog
Рет қаралды 149 М.
AES: How to Design Secure Encryption
15:37
Spanning Tree
Рет қаралды 184 М.
I built my own 16-Bit CPU in Excel
15:45
Inkbox
Рет қаралды 1,7 МЛН