Securing Stream Ciphers (HMAC) - Computerphile

  Рет қаралды 307,965

Computerphile

Computerphile

Күн бұрын

Bit flipping a stream cipher could help you hit the Jackpot! But not with HMAC. Dr Mike Pound explains.
Correction : "pseudo" is spelled incorrectly on the graphic.
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscom...
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 223
@ZehEduardo
@ZehEduardo 7 жыл бұрын
I want to meet this man. I feel like I could hear him talking from hours and not get bored.
@JoeMarGonzales
@JoeMarGonzales 4 жыл бұрын
@urbex2007 I guess it's supposed to be that way. He never looks directly into the camera, he looks towards the hidden interviewer instead.
@pierluiginegro772
@pierluiginegro772 3 жыл бұрын
It's his enthusiasm that does the trick! I'm absolutely caught up in his speech, unable to stop listening, getting angry at the video ending so abruptly!
@misspaula9186
@misspaula9186 2 жыл бұрын
You can say that again
@arrowtlg2646
@arrowtlg2646 2 жыл бұрын
I took the Computer Security Module and audited the Cryptography modules this year at the university of nottingham, both of which were taught by Dr Mike Pound, and honestly it was amazing. He has a great way of explaining hard concepts in a way that's easy to understand.
@dalegeddes687
@dalegeddes687 Жыл бұрын
I'd love to meet this man too huge respect for Mike pound :)
@StreuB1
@StreuB1 7 жыл бұрын
....I honestly get the feeling that Dr. Pound is wildly more intelligent that we realize or he portrays and he always seems like he has to hold back just a bit so he doesn't inadvertently say too much. Like, there is a line that shouldn't be crossed with regard to explaining things and he is constantly dancing with that line and at times has to stop for a moment and think "Ok, right, where am I?....oh, right, ok we can go further" lol Anyone else get that?? Hes awesome man.
@minihjalte
@minihjalte 7 жыл бұрын
Brian Streufert what? He is obviously very intelligent, else he wouldnt have doctorate.
@StreuB1
@StreuB1 7 жыл бұрын
Nooo....beyond that level even!
@minihjalte
@minihjalte 7 жыл бұрын
Brian Streufert what level do you mean? Omnipotent/supernatural level?
@FriedEgg101
@FriedEgg101 7 жыл бұрын
Would you say that you find his intelligence artificial?
@kale.online
@kale.online 7 жыл бұрын
I get what you mean. Hopefully like Robert Miles he starts his own channel
@markusdemedeiros8513
@markusdemedeiros8513 7 жыл бұрын
Dr. Pound! This guy could read me his shopping list and I would still watch it
@Hexanitrobenzene
@Hexanitrobenzene 5 жыл бұрын
I'm sure he would manage to make it hilarious :)
@gatoradeee
@gatoradeee 7 жыл бұрын
This bloke is a well-rounded pundit of computer science--vision, cryptography, algorithms, all the good stuff.
@SmallSparrowsChannel
@SmallSparrowsChannel 5 жыл бұрын
Absolutely love these computerphile videos. To the team: please do not stop making more videos!
@brooped
@brooped 7 жыл бұрын
Please sent Mike £100
@Anvilshock
@Anvilshock 7 жыл бұрын
Sneeze bent like 7FFF
@kebman
@kebman 7 жыл бұрын
Thank you Please!
@philtrem
@philtrem 6 жыл бұрын
He wants it yesterday !
@8b8b8b
@8b8b8b 5 жыл бұрын
Please sent Mike £100 yesterday Please send Mike £100 today
@downstream0114
@downstream0114 4 жыл бұрын
Plase send Mike £10M
@jamesvanden6251
@jamesvanden6251 7 жыл бұрын
HE'S BACK! ALL ABOARD THE TRAIN TO POUND TOWN...
@amaarquadri
@amaarquadri 7 жыл бұрын
The encryption related Computerphile videos are some of my favorite.
@daft_punker
@daft_punker 7 жыл бұрын
This guy is my favorite!
@OnlyUseMeEquip
@OnlyUseMeEquip 7 жыл бұрын
make a 2 hour video with this guy, i could listen to him all day
@jony7779
@jony7779 7 жыл бұрын
Great video. I love Mike Pound - he is my favorite person on computerphile
@MikhailFederov
@MikhailFederov 11 ай бұрын
Just wait until you meet Mike Hawk
@Xe4ro
@Xe4ro 2 жыл бұрын
Switching off is probably not what anyone has ever done that clicked on a Computerphile video, especially with Mike.😁
@rogervanbommel1086
@rogervanbommel1086 2 жыл бұрын
Well, do not forget AES CBC is weird, it’s a block cipher, though because of the XOR chaining you can also do this there
@brandonbirchall5389
@brandonbirchall5389 7 жыл бұрын
Love this series, but could you please cover Elliptic curve Cryptography? I feel like this channel explains everything the best, so it would be much appreciated.
@foobargorch
@foobargorch 7 жыл бұрын
djb and Tanja Lange have a great intro to the subject from 31c3
@cobaltno51
@cobaltno51 5 жыл бұрын
@@foobargorch Thanks for that!
@ArthurKhazbs
@ArthurKhazbs 7 жыл бұрын
Mike is implicitly asking us to send him £100
@cronaut5429
@cronaut5429 6 жыл бұрын
£900 *
@NoNameAtAll2
@NoNameAtAll2 5 жыл бұрын
Sent*
@yoavklein123
@yoavklein123 2 жыл бұрын
Something I didn't understand. Around 5:00, after introducing the first "naive" solution to the problem of tampering the stream cipher - i.e. computing a hash - Dr. Mike rejects this immediately because the middle-man can easily tamper the message and then compute a hash. what I don't understand is how can he compute the hash of the unencrypted message? All he has is the encrypted message, and if the hash is of the un-encrypted, how can he compute this?
@0xbenedikt
@0xbenedikt Жыл бұрын
I don’t understand either. Also if you send the hash encrypted too, there would in my mind absolutely be no way to reconstruct it
@00a5-h8j
@00a5-h8j 7 жыл бұрын
This video seemed to end without much of a conclusion...
@user-tr3qt3qs9t
@user-tr3qt3qs9t 7 жыл бұрын
The seccond method can actually be just as secure if it is guaranteed that none of the valid messages can be a simple concatenation of 2 or more other valid messages. The easiest way to guarantee it is just to always put a total message length block somewhere inside the protected message. This method is a little bit faster than the HMAC.
@kingofshorekishore
@kingofshorekishore 3 жыл бұрын
its said if you can explain something in simple words, you dont understand the concept. But you sir are just a marvel. Thanks alot.
@friewire
@friewire 6 жыл бұрын
I have an exam in computer security coming up soon. These videos are golden
@mahneh7121
@mahneh7121 2 жыл бұрын
Something implicit in the video: the key in a SC is the same length than the message. Fantastic expl. The guy is a genius
@bhexric
@bhexric 7 жыл бұрын
I didn't even know HMACs existed until I came across them at work - it's good to know a bit more about them.
@DreamingWithEyesWide
@DreamingWithEyesWide Жыл бұрын
Dr. Mike is the best! And this totally reminds me of the Office, especially with the personal interviewing and the random zooms and close-ups 😂 I also love the washing machine animation!!
@y__h
@y__h 7 жыл бұрын
Someday you should do a video on AEAD, which is more modern than plain old Stream cipher.
@esmatsaidy
@esmatsaidy 4 жыл бұрын
I like the way how he comes to the topic, it's brilliant Mike!!!!
@jordanwaeles
@jordanwaeles 7 жыл бұрын
Is it wrong to feel kinda in love with him? I might have completed my studies if he were my teacher.
@Xathian
@Xathian 7 жыл бұрын
He's the archetype for the perfect teacher to engage students in learning. He combines easy grasped examples with technical concepts and makes even very complex subjects easily understandable even to a slightly learned layman.
@Destrolll
@Destrolll 5 жыл бұрын
5:13 But why don't we encrypt the checksum too? In other words be append hash of the message right *before* we do the encryption
@0xbenedikt
@0xbenedikt Жыл бұрын
I’d love to know the reason too
@dlovegrove11
@dlovegrove11 7 жыл бұрын
I feel like these videos always just scratch the surface and don't go in depth too often. I really would like to see some in depth content for the loyal subscribers!
@marcthachxuanky5744
@marcthachxuanky5744 6 жыл бұрын
This is the most amazingly clear and concise explanation, thanks
@lynxtouch
@lynxtouch 4 жыл бұрын
You're helping me so much studying for my Security+ exam!!!!
@abnorcscreenname8489
@abnorcscreenname8489 6 жыл бұрын
This guy is awesome. Make sure he keeps on making us videos!
@boynedmaster
@boynedmaster 7 жыл бұрын
just had an hmac nightmare, this came a bit too late
@gcheese25
@gcheese25 3 жыл бұрын
Should have watched this video before my midterm...finally I feel like I know something. Thanks!
@alloounou6900
@alloounou6900 2 жыл бұрын
Actual HMAC stuff starts at 4:00 Until then, he's pointing out flaws with substitution in a stream cipher.
@aparnasingh6829
@aparnasingh6829 4 жыл бұрын
How are you able to explain topics so easily.Seriously, it seems like child's play when I understand things like this
@dd9516
@dd9516 7 жыл бұрын
I have a big ask. It may take several videos but I should love to see a simple but complete differential cryptanalysis. And a set on linear cryptanalysis. We hear about it all the time but it means very little to most of us. There are many books on it but these are hard to follow, a video would be much easier and better. Thanks! If you do it I shall sent a much bigger 'thank you', capital letters and all!
@pinnekjtt8002
@pinnekjtt8002 2 жыл бұрын
I freaking love this dude. Why aint this guy my teacher.
@msolomonbush
@msolomonbush 7 жыл бұрын
I like the videos that Dr. Pound does on cryptography and cryptoanalytics, but it would be nice if he could get into more of how the math works behind the concepts. Not just describe the variables.
@mechris13524
@mechris13524 7 жыл бұрын
I think in the video, we were shown this as a non-working solution: encrypt(message)|hash(encrypt(message)) Why couldn't you do this: encrypt(message|hash(message))
@gryzman
@gryzman 7 жыл бұрын
that's essentially what signing is, you take checksum and encrypt it with the private key - and what you get is a signature.
@suncrasher4168
@suncrasher4168 7 жыл бұрын
but both keys are private...
@TMaorgmrtrstogamFFDsKMO
@TMaorgmrtrstogamFFDsKMO 7 жыл бұрын
Greg Jaskiewicz j
@TMaorgmrtrstogamFFDsKMO
@TMaorgmrtrstogamFFDsKMO 7 жыл бұрын
Greg Jaskiewicz o
@unvergebeneid
@unvergebeneid 7 жыл бұрын
Christopher Smith, yes, I was definitely missing an explanation for why that is a bad idea!
@Valery0p5
@Valery0p5 2 жыл бұрын
You say hases aren't for disks, but I'm pretty sure full disk encryption needs to have something like that... I remember hmacs being mentioned in the WiiU external drive encryption scheme...
@domenicgilardoni1802
@domenicgilardoni1802 6 жыл бұрын
what exactly stops us from doing h(m|k) as opposed to h(k|m)? we don't need to worry about resuming the internal state of the hash function because that would only allow us to append to the key, not the message
@jeanmarabou9774
@jeanmarabou9774 Жыл бұрын
Why not just do SHA2( msg | key ) and not SHA2( key | msg ) like this the malicious appends can only get SHA2( msg | key | malicious ) but the check will be made SHA2( msg | malicious | key) ?
@mouadjadil2958
@mouadjadil2958 2 жыл бұрын
these guys are legends
@blakezonca9865
@blakezonca9865 7 жыл бұрын
*Sees doc pound* *EXTERMINES THAT LIKE BUTTON*
@tommyboy3164
@tommyboy3164 3 жыл бұрын
Thanks. Studying for CISSP. I just subscribed!
@loudej
@loudej 7 жыл бұрын
Great video! Can you also do one talking about HMAC-before-encrypt vs encrypt-before-HMAC? encrypt(message)|hmac(key,encrypt(message)) vs encrypt(message|hmac(key,message))
@hardikmaru3311
@hardikmaru3311 2 жыл бұрын
Confidentiality isn't the objective of HMAC, so encrypting the final message doesn't make sense. HMAC provides authentication and integrity
@thomasb1337
@thomasb1337 2 жыл бұрын
@@hardikmaru3311 You would want to encrypt then HMAC the encrypted message. Also known EtA
@gabrielazevedo6028
@gabrielazevedo6028 Жыл бұрын
The teaching is awesome and he explains greatly, but i can't help but to notice how every video seems like an episode from The Office
@recklessroges
@recklessroges 7 жыл бұрын
I was just writing in the middle of writing an RFC6238 TOTP in C++ (because I can't find any that compile in Code::Blocks to run in cmd.exe. Obviously over on Linux its all just works.)
@TotalImmort7l
@TotalImmort7l 4 жыл бұрын
There is a guy named Please who pleases Mike. Anyways, what is special about CMAC and Poly1305?
@Anvilshock
@Anvilshock 7 жыл бұрын
This guy couldn't look any more mischievous if he wore a black henchman's mask befitting a 70s' Batman episode.
@harshalbhoir1262
@harshalbhoir1262 4 жыл бұрын
thanks a lot this helped me in studying hmac for my exams
@user-sc1gd6kd4u
@user-sc1gd6kd4u 2 жыл бұрын
Is this part of a series? He mentions the SHA video as if I'm supposed to have seen it before, but I can't find an official playlist with computer security related videos från computerphile.
@xBZZZZyt
@xBZZZZyt Жыл бұрын
06:33 would adding length of message (excluding added length) in message prevent append attack?
@yoavklein123
@yoavklein123 2 жыл бұрын
The questions of the guy with the camera don't sound very clearly..
@Bloodman42
@Bloodman42 7 жыл бұрын
I like the void cube and ghost cube on the shelf. :D
@johanneszwilling
@johanneszwilling 7 жыл бұрын
😏 Ghost Cube has finally been solved 🙌
@coomservative
@coomservative 5 жыл бұрын
why not just append a salt and signature of the message+salt after that BEFORE applying the cipherstream? The attacker could change the message, but they're going to have a pretty hard time guessing what the salt is to compute the hash and even if they did they wouldn't be able to XOR it to the state the recipient expects.
@paulfragemann3333
@paulfragemann3333 11 ай бұрын
could you hash the message and append the hash before encrypting it and then verifying i after decryption, or are there any security implications that make that a bad idea?
@sarainiaangelsong440
@sarainiaangelsong440 2 жыл бұрын
Wait a sec? So a Block cipher changes multiple bits? so if I changed a single letter/bit, in the message that in turn makes the entire message of letters before and after get altered also??? I know of alot of coding systems but as far as I'm aware I think everything usually is 1 to 1, example if we used Enigma 1 letter in 1 letter out sorta like a substitution! If we Transposition it then the same amount of letters move around, If we playfair it then we still end up with same count of letters, in fact I can't think of any 1 situation where 1 plaintext letter is fully responsible for keeping the entire rest of the message mathematically in tact The only thing I can think of is... if you Take 8 Letters that are 8 Bits long in Ascii and Put the rows of numbers 1 by 1 under until you get like 8x8 thus 64 bits but instead grouping all the 1st bits and making an Ascii character out of then then all the 2nd bits until all 8 is done then substitute that maybe along with a 1 time pad, then I can see how maybe by chance changing 1 Ascii can sometimes Affect many characters, unless I'm not seeing something here? So example lets say A=001 B=010 C=100 R=111and our word was Cab then 100, 001, 010 if stacked could be 100, 001, 010 which doesn't change anything but lets try BAR, 010, 001, 111 we get now, 001, 101, 011 now this is kinda neat because we have new numbers which might be mapped to a question mark or something if this was 8 bit ascii but then math to it could change it yet again. I can't 100% see how a single change normally can affect the outcome of how a message works, but I can see in my example how sometimes hit or miss it can affect the entire message! I will have to look at block ciphers to maybe understand, but for most part from my experience the bulk of codes/encryption almost always is the Plain Text being heavily altered with some steps where if you isolated any letter usually, you get the plaintext of that specific letter! Equally speaking if deleting a letter anywhere or changing a letter anywhere also usually doesn't disturb a message most times in all of it's entirety. However what I can say is... if it is possible where 1 Letter is the only way to crack the code if unchanged and all characters have that exact same property and must be One! Then yes that would be 100% valuable and secure as you can just take that and put that through 1 to 1 ciphers knowing there was a step involved that binds all of them together as a whole as one unit.
@baatar
@baatar 6 жыл бұрын
So, the outerpad and innerpad are just arbitrary constants that are used to derive the two separate keys which are then used to hash the message authentication code?
@oriongalactic
@oriongalactic 6 жыл бұрын
Why we just hash before encrypt all together message and hash? we could not compute a new hash for the changed message since we would need to know the encryption key
@charan_75
@charan_75 Жыл бұрын
How do the sender and receiver get same key? Do they use key exchange protocols?
@J2963-u3x
@J2963-u3x 3 жыл бұрын
Hash length extension attack video ?
@PvblivsAelivs
@PvblivsAelivs 7 жыл бұрын
Someone just flipping bits like that doesn't have the old message or the new message to compute the hashes from. Plus the hash itself is likely to be encrypted. Here, it comes down to how much power you think the attacker has. If he can read all your messages and correctly guess all your keys, you're sunk anyway because he can do whatever he wants.
@foobargorch
@foobargorch 7 жыл бұрын
it's still useful to ensure by construction that the code that reads these messages can't accidentally reveal any information (for example side channel or timing attacks could play into this), or be made to crash given tampered data, naive tamper resistance schemes do not necessarily meet these criteria even if they exclude tampering per se
@JNET_Reloaded
@JNET_Reloaded 5 жыл бұрын
What about video encryption is this stream cypher?
@fandingoORG
@fandingoORG 7 жыл бұрын
Doc Pound is my jam
@macdjord
@macdjord 4 жыл бұрын
Why not just append the key to the end of the message before taking the hash instead of prepending it to the beginning? Wouldn't that solve length-extension?
@DanDart
@DanDart 4 жыл бұрын
The captions on this aren''t great, any way for me to edit?
@loadedfries5764
@loadedfries5764 7 жыл бұрын
I've really enjoyed these videos that are related to information and security! I was wondering though, could you guys could make some videos in the "Essentials" series that cover the basics of those topics?
@foobargorch
@foobargorch 7 жыл бұрын
Unfortunately it's a broad subject, and modern cryptography (elliptic curves, for example) has really changed a lot of what is considered "essential" compared to a few years ago. There are some great courses on youtube, but that's literally tens of hours of material...
@johnbll106
@johnbll106 3 жыл бұрын
So I guess the length extension video never came out sed.
@DynoosHD
@DynoosHD 7 жыл бұрын
Why doesnt this work?: encrypt(message hash(message))
@wapted
@wapted 7 жыл бұрын
well, it does work.
@gajbooks
@gajbooks 7 жыл бұрын
It does, but I think the intent was to secure an arbitrary message without requiring knowledge of what cypher it was using. Other people could bit flip all they want but unless they can decode the stream in the first place they can't correctly re-encode a new hash.
@ikkohmation
@ikkohmation 7 жыл бұрын
It's a stream cipher, so you shouldn't be able to hash the whole message ? (I think)
@PeregrineBF
@PeregrineBF 7 жыл бұрын
It makes you vulnerable to padding oracle and other chosen ciphertext attacks. That construction is called MAC then Encrypt, and is insecure if the encryption scheme is vulnerable to such attacks (many are, and are designed to use a MAC of the ciphertext to remove the vulnerability).
@foobargorch
@foobargorch 7 жыл бұрын
this is worse than MAC-then-encrypt, since the hash isn't signed, a chosen plaintext attack will also allow forgery, for stream ciphers and non chaining block cipher modes: You choose m_1, and get c_1: c_1 = k_1 ^ (m_1 || H(m_1)) You can recover the key stream (but not with a chaining block cipher mode): k_1 = c_1 ^ (m_1 || H(m_1)) Forge ciphertext for arbitrary message m_2: c_2 = k_1 ^ (m_2 || H(m_2)) In other words, the hash only provides integrity checking, not authentication
@Seegalgalguntijak
@Seegalgalguntijak 7 жыл бұрын
I've seen SHA512 being used as a hash function. Does it have the same flaws as SHA256?
@Tomyb15
@Tomyb15 7 жыл бұрын
From 6:10 to 6:42 I got completely lost. I didn't understand what you were talking about and also couldn't make out some words. Could somebody explain it to me or just point me to the video I missed to understand that?
@foobargorch
@foobargorch 7 жыл бұрын
The Merkle-Damgard construction is a way of taking what's called a compression function, which has nothing to do with compression like zip files - that takes two blocks of constant length and produces one block of constant length that is a "mix" of the two inputs, and extends it to any message length by splitting the message into blocks, and chaining the blocks together, so you "compress" an initialization vector with the first block, and then take the output of that and the next block and "compress" that... Since the final hash is output of the last compression operation, if you know the hash of a message, you can produce the hash of any of its suffixes, even if you don't know the original message. Using his example, you could add additional 0s to the amount, instead of changing the most significant digit, even if it was prefixed with a key. By adding another hashing step that also depends on the key, you can prevent this kind of tampering, which is known as a length extension attakc.
@SeeingGreenDevils
@SeeingGreenDevils 4 жыл бұрын
so why not just use digital signatures? when would we use HMAC as oppsed to using signtures?
@TheStevenhull
@TheStevenhull 3 жыл бұрын
Gotta love the paper he uses with the sprocket holes. Who does that ?!?! LoL
@maxijonson
@maxijonson 4 жыл бұрын
DONT QUIT THE VIDEO JUST YET 😂
@f3lixhu123
@f3lixhu123 3 жыл бұрын
Well done ! really enjoyed your video.
@Krissini
@Krissini 5 жыл бұрын
thank you for that brilliant video!
@bohitargep
@bohitargep 7 жыл бұрын
YAY he finally solved the ghost cube
@Mathematicmaster
@Mathematicmaster 7 жыл бұрын
0:53 Left upper corner, that ghost cube :D
@all-rounderb5012
@all-rounderb5012 3 жыл бұрын
Very few understand this.
@darshanv1748
@darshanv1748 2 жыл бұрын
If we insert the hash (k1|m) at the start of message itself won't it also solve the problem? May be it s not efficient to prepend than append but i think it'l also solve the problem, but i would like to know your opinion
@mihaistoian_
@mihaistoian_ 2 жыл бұрын
Thank you!
@fayasamd5204
@fayasamd5204 3 жыл бұрын
Did i miss something or he never mention how we gonna send the shared secret key to the other person ?
@kolrabi
@kolrabi 7 жыл бұрын
So... do you HMAC then encrypt or encrypt then HMAC? And for the love of Turing, please clean your screen. :)
@stheil
@stheil 7 жыл бұрын
IIRC, both are valid approaches and both are used in practice.
@bengrap0
@bengrap0 7 жыл бұрын
Both are used. However, the new consensus is to encrypt then hmac. It allows you to skip decryption when the hmac is invalid. Thus allowing you to break earlier in your algorithm, resulting in less implementation mistakes. For example with block ciphers it might still be possible to exploit a padding oracle if the attacker can distinguish between the decryption failing and the hmac check failing, which in the case of never touching the encrypted text can never happen.
@foobargorch
@foobargorch 7 жыл бұрын
if you use a random ID, you need to keep track of what it's identifying, which means you need to store that data, and storage scales as the number of things you need to keep track of. Using an authenticated encryption lets you delegate the storage to an untrusted party, without revealing the contents and without compromising your trust in the data, and only need to store a small amount of unchanging data.
@banderi002
@banderi002 7 жыл бұрын
You can see at 5:44 the spider bite in Tobey Maguire's hand
@songofyesterday
@songofyesterday 5 жыл бұрын
Helps me study for CISSP, thanks!
@peschebichsu
@peschebichsu 3 жыл бұрын
There's no video about the length extension attack yet if i see right :(
@d1ngo153
@d1ngo153 Жыл бұрын
idk why but this reminds me of the office
@DrKaii
@DrKaii 7 жыл бұрын
Why do I get the feel that this guy was a car mechanic in a previous life?
@Rsutton99
@Rsutton99 7 жыл бұрын
Great vid! But, those fingerprints on Mike's monitor are really upsetting :p
@DorthLous
@DorthLous 7 жыл бұрын
Psuedo?
@KulasangarGowrisangar
@KulasangarGowrisangar 6 жыл бұрын
Does anyone know, what's inner pad and outer pad which he mentions at 8:10?
@fahd2372
@fahd2372 2 жыл бұрын
Why not instead of hashing the encrypted message, instead hash the original message? That way a middle-man wont be able to compute the hash without decrypting the entire message.
@islandfireballkill
@islandfireballkill 7 жыл бұрын
Why wouldn't you just take the approach of appending the secret key to the end of the message? You wouldn't know the internal state then.
@islandfireballkill
@islandfireballkill 7 жыл бұрын
If the problem is that you could brute force much faster since you can precompute most of the hash, then why not pad the key to both sides of the message?
@foobargorch
@foobargorch 7 жыл бұрын
HMAC is resistent to length extension attacks and would be even with concatenation, since the hash of the message is hashed again performing a length extension attack on HMAC requires a preimage attack on the hash function
@foobargorch
@foobargorch 7 жыл бұрын
Having thought about the alternate scheme you proposed (key at both ends), I really can't come up with a reason as to why that's functionally different. For a Merkle-Damgard function you can think of an HMAC construction on top of it as if it's just like your scheme, but with an extra copy of the initialization vector added towards the end, and the argument order to the compression function getting flipped twice (I think) [edit top clarify: two applications of the compression functions are flipped, not all of them are flipped twice, which does nothing ;-)]. I think since the construction doesn't assume anything different about the two inputs to the compression function, swapping the arguments like that doesn't change the security assumptions, nor does adding the extra IV as a delimiter, so I think it's basically equivalent, in terms of the security guarantees. However I also don't see any benefit to your proposed schema, apart from very minor efficiency gains, the algorithmic complexity is on the same order. Bear in mind that I'm not an expert or anything, I just think you asked a very interesting question =)
@iJuenger
@iJuenger 7 жыл бұрын
CBC mode for block ciphers
@nickpelov
@nickpelov 4 жыл бұрын
What if instead of appending the key you prepend the key. It's secret so no one would know what the state would be after the key.
@lonerboy013
@lonerboy013 7 жыл бұрын
is it just me or are they spelling "pseudo" as "psuedo"?
@Computerphile
@Computerphile 7 жыл бұрын
+lonerboy013 I thought that didn't quite look right! Should've checked! >Sean
@gedeonandrasmusic
@gedeonandrasmusic 3 жыл бұрын
"We can actually change the amount get sent, which unfortunately is a purely hypothetical example, I don't actually get any money" 😂
@naboogom2733
@naboogom2733 6 жыл бұрын
need more !!!
@george-cristianbirzan8643
@george-cristianbirzan8643 7 жыл бұрын
Whose videos are referenced in the bit about hamming distance at 8:50, Dave Brelson is the best I can make out...
@Computerphile
@Computerphile 7 жыл бұрын
+George-Cristian Bîrzan Professor Dave Brailsford has done a number of computerphile videos regarding hamming codes
@george-cristianbirzan8643
@george-cristianbirzan8643 7 жыл бұрын
Right. Thanks! English pronunciation/spelling is weird. However, I always felt that guests on the show should be showcased more, nobody reads the description. I'll blame it on that! :-(
@andrewcai8130
@andrewcai8130 5 ай бұрын
I dunno about you guys, but I have trouble having a clear understanding of what this guy talks about when he explains things. It's hard to grasp. No disrespect though.
Taming Kerberos - Computerphile
16:06
Computerphile
Рет қаралды 323 М.
Modes of Operation - Computerphile
14:16
Computerphile
Рет қаралды 222 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 90 МЛН
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 2,3 МЛН
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,5 МЛН
Hide your files like a hacker (5 Ways)
19:17
NetworkChuck
Рет қаралды 105 М.
HMAC explained | keyed hash message authentication code
6:33
Jan Goebel
Рет қаралды 69 М.
Why so many distros? The Weird History of Linux
8:23
Fireship
Рет қаралды 1,5 МЛН
LogJam Attack - Computerphile
18:47
Computerphile
Рет қаралды 181 М.
I Designed My Own 16-bit CPU
15:46
AstroSam
Рет қаралды 2 МЛН
Horrible, Helpful, http3 Hack - Computerphile
20:55
Computerphile
Рет қаралды 81 М.
7 Cryptography Concepts EVERY Developer Should Know
11:55
Fireship
Рет қаралды 1,3 МЛН
Authenticating Data with Message Authentication Codes
21:56
Aleksander Essex
Рет қаралды 18 М.
Cross Site Request Forgery - Computerphile
9:20
Computerphile
Рет қаралды 763 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 90 МЛН