7 Cryptography Concepts EVERY Developer Should Know

  Рет қаралды 1,273,111

Fireship

Fireship

Күн бұрын

Cryptography is scary. In this tutorial, we get hands-on with Node.js to learn how common crypto concepts work, like hashing, encryption, signing, and more fireship.io/lessons/node-cryp...
🔗 Resources
Full Tutorial fireship.io/lessons/node-cryp...
Source Code github.com/fireship-io/node-c...
Node Crypto nodejs.org/api/crypto.html
📚 Chapters
00:00 What is Cryptography
00:52 Brief History of Cryptography
01:41 1. Hash
04:07 2. Salt
05:47 3. HMAC
06:35 4. Symmetric Encryption.
08:19 5. Keypairs
09:29 6. Asymmetric Encryption
10:22 7. Signing
11:31 Hacking Challenge
🔥 Get More Content - Upgrade to PRO
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🔖 Topics Covered
- Cryptography for Developers Basics
- Crypto algorithms: SHA, MD5, argon2, scrypt
- How password salt works
- Encryption vs Signing
- Difference between Asymmetric vs Symmetric Encryption
- How hacking works and hacks are prevented

Пікірлер: 983
@alessiocosenza295
@alessiocosenza295 2 жыл бұрын
9:44 Actually, HTTPS uses asymmetric encryption to establish the identity of the parties and to exchange a symmetric key. Then symmetric encryption is used since it's faster
@alexlotito3884
@alexlotito3884 2 жыл бұрын
u right
@aba22125
@aba22125 2 жыл бұрын
I'm always doing that with my networking code, but I still don't understanding signing. So I simply require the client to give a shared password to the server to confirm its identity. If password is wrong for whatever reason or isn't provided in time, the thread simply raises an error and the client is kicked out from accessing the server in any way.
@jimbobur
@jimbobur 2 жыл бұрын
Came here to say this. It's just used for the handshake.
@gravy1770
@gravy1770 2 жыл бұрын
@@FinlayDaG33k so that means TLS uses asymmetric encryption, right?
@FinlayDaG33k
@FinlayDaG33k 2 жыл бұрын
@@gravy1770 asymmetric to establish the shared secret before swapping to symmetric.
@prowhiskey2678
@prowhiskey2678 2 жыл бұрын
I really appreciate that you came back on your past mistake of using md5
@owacs_ender
@owacs_ender 2 жыл бұрын
This makes me happy, even if my original comment on the matter got deleted lol
@yassin_eldeeb
@yassin_eldeeb 2 жыл бұрын
and he has used it for the hacking challenge, very clever..no one thought that you'll use md5 again after correcting the past video mistake 😂😂
@beyondcatastrophe_
@beyondcatastrophe_ 2 жыл бұрын
Whoops
@rice5817
@rice5817 2 жыл бұрын
I was thinking "dude... MD5 was unsafe when I was in senior high 15 years ago..." 🤣 Good thing he owned up to his mistake 👍
@kaporos
@kaporos 2 жыл бұрын
@@yassin_eldeebHe did that to give the proof that md5 is outdated
@hannes-
@hannes- 2 жыл бұрын
So whose password are we collectively brute-forcing for you in the challenge? :D
@favourbede5889
@favourbede5889 2 жыл бұрын
😂😂😂 Good question 😂😂😂
@SirusStarTV
@SirusStarTV 2 жыл бұрын
Hahaha
@festyVAL21
@festyVAL21 2 жыл бұрын
loool 🤣🤣
@layeekromah4799
@layeekromah4799 2 жыл бұрын
It's probably the lifetime account password, if you crack it is yours
@mulwelimushiana8388
@mulwelimushiana8388 2 жыл бұрын
😂😂😂 I did not see it that way at first but you make a lot of sense
@MrSamkots
@MrSamkots 2 жыл бұрын
How to create a great KZbin channel? Step 1: automatically know what the viewers want in the next video Step 2: squeeze the complex content in shortest possible duration Step 3: throw in some smooth humour without changing the tone Step 4: throw in some cool animations Step 5: use dark background 💯% perfection!
@KangJangkrik
@KangJangkrik 2 жыл бұрын
This comment need to be pinned
@eliasziad7864
@eliasziad7864 2 жыл бұрын
PX ODLT HXDABNUO 9 Let's see if you guys can decrypt this message.
@shokifrend77
@shokifrend77 2 жыл бұрын
​@@eliasziad7864 rickroll would have been funnier
@eliasziad7864
@eliasziad7864 2 жыл бұрын
@@shokifrend77 First tell me what the message said?
@slez8364
@slez8364 2 жыл бұрын
Can't get more accurate ♥️
@DenisTRUFFAUT
@DenisTRUFFAUT 2 жыл бұрын
Once you deep dive into cryptography you find that, even the strongest encryption algorithm in the world is weak if the user input is weak. The best course of action is to have an input that does not come from the user (I mean a generated password like a sha-512 hash). Ideally that entry is stored on the client device.
@catalintudorciurte309
@catalintudorciurte309 2 жыл бұрын
Garbage in... Garbage out
@marioytambor
@marioytambor 2 жыл бұрын
Definitely, only randomly generated or diceware are acceptable
@ikazuchi-san5772
@ikazuchi-san5772 2 жыл бұрын
yep
@chiragsingla.
@chiragsingla. 2 жыл бұрын
thats why 8 charcter is a standard
@SirusStarTV
@SirusStarTV 2 жыл бұрын
I started using password manager and updated most passwords to unrememberable computer generated ones.
@danvilela
@danvilela 2 жыл бұрын
Jeff wants to crack his girlfriend's password and put it as a challenge on his youtube channel. Well played bro!
@ayushverma5151
@ayushverma5151 2 жыл бұрын
I think he's married
@zakharkholboiev842
@zakharkholboiev842 2 жыл бұрын
@Daniel Vilela, 😂
@MrRaja
@MrRaja Ай бұрын
@@ayushverma5151 wife then it is
@brucewayne2480
@brucewayne2480 2 жыл бұрын
@02:08 you said that the hash is unique , given that the result has a fixed length you can't map infinite strings to a fixed length string without loosing unicity
@Fireship
@Fireship 2 жыл бұрын
Good point, "unique as possible" would have been a better phrasing.
@yakov9ify
@yakov9ify 2 жыл бұрын
Its unique for all practical purposes for the modern cyphers uses today. Afaik for SHA256 no one has ever been able to find a collision. That being said you are correct in that any hash by definition cannot be injective.
@brucewayne2480
@brucewayne2480 2 жыл бұрын
@@yakov9ify Yes , by definition hash functions have low probability of collision. And like you said they are surjective functions
@YandiBanyu
@YandiBanyu 2 жыл бұрын
Well yes, that is what is called collision. But the idea of a hash is also that collision is hard to find (with a systematical method other than sheer brute force). Different input can be mapped to the same output. However, even the slightest change in the input (say, a bit flip) will change the output significantly. This, makes finding two input with the same output quite hard.
@precumming
@precumming 2 жыл бұрын
There's also the matter of that text converted to bytes which is then hashed, it's unlikely if there is a collision that the input can actually be created from the bytes from text, so there's some accidental security there. However random bytes which are hashed lack this "feature". If there is a collision with text inputs it's also likely that the password used is weaker than the other input that returns the same hash, so there's no downside.
@bytesizedfeed
@bytesizedfeed 2 жыл бұрын
I’m currently taking intro to security and this is exactly what we are learning. Thank you for explaining it so succinctly and with amazing visuals and code
@orzhovthief
@orzhovthief 2 жыл бұрын
Another important feature of hash algos is that similar inputs yield very different outputs, that way, you cannot guess that your getting close.
@abh1yan
@abh1yan 2 жыл бұрын
The quality of this video is literally perfect...
@stachowi
@stachowi 2 жыл бұрын
loved every minute,
@kaporos
@kaporos 2 жыл бұрын
Every fireship's videos are perfect haha
@GalacticApple
@GalacticApple 2 жыл бұрын
10 hours of this topic at uni and I understood things about 80% of the way. I'm confident that if I watched this I would've been at 100% in 12 minutes.
@cybermoneyxchange3230
@cybermoneyxchange3230 2 жыл бұрын
Hi how's the journey so far? Where can I get the 10 hrs lesson?
@lookupverazhou8599
@lookupverazhou8599 2 жыл бұрын
@@cybermoneyxchange3230 at uni
@agungkrisna4544
@agungkrisna4544 Жыл бұрын
@@berb_yt This is what I'm experiencing right now :>
@ekremaslan8068
@ekremaslan8068 Жыл бұрын
They teach most things so slow that it becomes impossible to understand
@jessh4016
@jessh4016 9 ай бұрын
I always hate these comments tbh. It's just not possible a general, brief overview to give you more than 10hrs of uni classes. Idk if you were sleeping or drunk in class, but even though this video is great, it's simply not able to cover that much info in 12min. Hope you've learned how to pay attention.
@rahesc
@rahesc 2 жыл бұрын
Awesome sum up of crypto concepts for developers in under 12 minutes, really to the point, impressive
@artemabovian4840
@artemabovian4840 2 жыл бұрын
I think this the first KZbin video where I actually set playback time to value lower than 1
@adyanrehan3360
@adyanrehan3360 2 жыл бұрын
Assembly in 100 seconds
@simondoesstuff
@simondoesstuff 2 жыл бұрын
You maniac
@bravo________87372
@bravo________87372 2 жыл бұрын
If he did a risc based architecture like ARM it might be doable
@multiarray2320
@multiarray2320 2 жыл бұрын
Assembly in 100 hours
@adyanrehan3360
@adyanrehan3360 2 жыл бұрын
Talking about assembly in a whole I mean all architectures including x86 and risc
@ikazuchi-san5772
@ikazuchi-san5772 2 жыл бұрын
that would be fun tbh
@tutorjonas4149
@tutorjonas4149 2 жыл бұрын
Thanks for making theses videos. You're creating a mind map for developers to get a grasp of the vast technology landscape - props to you, your content is truly unique and high quality too.
@johncardozo
@johncardozo 2 жыл бұрын
I really love every single video you post, they're so useful but this one... Wow! Thanks for sharing your knowledge 🤙🏼
@tranquility6358
@tranquility6358 2 жыл бұрын
@ around 02:12 argon2 is listed as a hashing algorithm. It's more accurate to refer to it as PBKDF (Password Based Key Derivation Function), especially since you stated that hashing algorithms need to be fast to compute. Argon2 doesn't fit that description. It's acceptably fast to compute (It's orders of magnitude slower than say sha256) and that's by design, so that it becomes unfeasible to brute force them. It's also designed to account for increases in computational power over the years as you can make it harder to compute by increasing the amount of memory used to generate the derivative.
@tfr
@tfr 6 ай бұрын
i’ve noticed this in my api. I use 512kb of memory to hash and store user passwords but 128kb for api keys. it takes the server about 1.5 seconds to hash using 512kb which isn’t unreasonably slow but compared to sha256 or bcrypt, it’s like a snail. verifying api keys on each request with just a hash is also somewhat computationally intensive so that’s why i dropped the api key memory to 128kb. somewhat decent security balanced with speed. besides, i’d rather have my limited permission based api key brute forced than my password
@ArpitKumarSuman
@ArpitKumarSuman 2 жыл бұрын
You make hard concepts very easy. Thank you for the great contents.
@KishitaVariya
@KishitaVariya Жыл бұрын
Perfect! the video is upto the point - explaining all the concepts needed for a newbie to dive-in!
@midas6659
@midas6659 2 жыл бұрын
I'm subscribed to a f*ck ton of coding channels but this one is by far my favorite! So straight-forward and highly informative with a visual to complement it! I love how you explain a concept and then will proceed on with various examples as well as implementations. Keep it up bro!
@baddrivers759
@baddrivers759 2 жыл бұрын
Great start. I'd also add that the Public/Private Certificate is actually used to negotiate a random symmetric key which is used once the channel is opened. Why? Public/Private encryption is SLOW. This would be a great segway into Diffie-Hellman key exchange.
@prowhiskey2678
@prowhiskey2678 2 жыл бұрын
Nice video, it covers a lot of really important topics in a easy to understand way
@shaikhshafeen
@shaikhshafeen 2 жыл бұрын
You made JS look like a pancake! I wish I could get a good JS course from instructors like you.
@divyanshusah2809
@divyanshusah2809 2 жыл бұрын
I've used hash but not salt. Thanks for bringing this to me Jeff
@naheliegend5222
@naheliegend5222 2 жыл бұрын
use salt & pepper
@VivekYadav-ds8oz
@VivekYadav-ds8oz 2 жыл бұрын
I hope you didn't do this in production dawg 😯
@yassin_eldeeb
@yassin_eldeeb 2 жыл бұрын
my god. that was the best Cryptography video I've ever watched 🔥
@marcosandreslerin7470
@marcosandreslerin7470 2 жыл бұрын
It would be cool if you could create more videos like this to explain more every concept.. awesome work!
@bennthewolfe
@bennthewolfe Жыл бұрын
Great job on this video. Really awesome. I love the challenge at the end. Great content! Thank you for sharing.
@nativeKar
@nativeKar 2 жыл бұрын
The quality of content and the presentation of it keeps getting better with each video. I cannot be any more thankful to you than I already am for putting this out for free. I've learnt tons from this channel.
@phpsoftwareengineering
@phpsoftwareengineering 2 жыл бұрын
I second that!
@tristanbouchard9997
@tristanbouchard9997 2 жыл бұрын
Exactly what I needed to get started with a user account system for my website. Thanks lots!
@khangle6872
@khangle6872 Жыл бұрын
For school or just knowing the basic, that ok, but you should not implementing your own authentication system in a real product
@egorgor
@egorgor 2 жыл бұрын
Thank you for the great tutorial. I like this hands-on approach!
@willemvdk4886
@willemvdk4886 2 жыл бұрын
The mailbox analogy for public/private key is quite brilliant! Good job
@Remolhunter97
@Remolhunter97 Жыл бұрын
A whole semester saved by this man, thank you brother
@arcticspacefox864
@arcticspacefox864 2 жыл бұрын
Great vid, on RSA don't forget that it is getting really slow with increasing key size. This is why many providers are switching to elliptic curve cryptography ^^ That is way faster and needs smaller keys.
@tobiasaddicks9695
@tobiasaddicks9695 2 жыл бұрын
Also it's often implemented poorly when it comes to the generation of the required primes which leads to many public keys sharing prime-compartments
@arcticspacefox864
@arcticspacefox864 2 жыл бұрын
@@tobiasaddicks9695 exactly, but id say is a good video for beginners
@aba22125
@aba22125 2 жыл бұрын
Ohh never heard about this. I'm still use RSA 1024bit keys. Not that anyone would care to hack me so I'll just keep using it for now.
@darkpoker13
@darkpoker13 2 жыл бұрын
(Sorry for necroposting) I didn't want to go into details in my comment above, but there are multiple reasons why RSA isn't great nowadays. To make a short list: 1. You need quadratically increasing key size instead of linear increasing key size to get the same amount of security bits because of the reliance on prime numbers (AKA keys can get really big really fast and this will only get worse). 2. Key generation include a "brute-force" step, which makes key generate really slow. This is especially problematic for key exchanges, as this is a pattern seen in the wild. Apart from that, pretty much every operations is slower with RSA then with Elliptic Curves. 3. The way key generation work, your whole security model relies on the fact that your key is "probably" prime... 4. RSA design makes it a good target for timing attacks, depending on the implementation (this is also a reason why AES is slowly getting phased out in favor of chacha20) 5. RSA is badly broken with quantum computers because of Shor's algorithm. The danger with quantum computers isn't that they're so fast they could bruteforce any cryptographic primitives that classic computer can compute, it's more that quantum computers gets access to new quantum algorithms that can solve some previously "unsolvable" mathematical problem with way more ease then classical computers, so not all primitives are affected the same way.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Жыл бұрын
Quantum computers that can run Shor’s algorithm are vapourware, and destined to remain that way indefinitely.
@cmilkau
@cmilkau 2 жыл бұрын
Amazing that timing attacks and initial vectors are explained!
@Harmxn
@Harmxn 2 жыл бұрын
I just started learning this and now you made a video about it You have the best timing
@cmilkau
@cmilkau 2 жыл бұрын
Awesome to include HMAC and what it's used for. Unfortunately, it could be made more clear what the actual difference between hash and hmac is, as it is a common mistake to use hashes where hmacs should be used.
@kylector
@kylector 11 ай бұрын
what are the different use cases for a hash vs hmac?
@xbutterguy4x
@xbutterguy4x 11 ай бұрын
@@kylector The use case for regular hash functions is to provide data integrity. If even one bit changes in the data, then when you run it through the hash, it would be very obvious the data was altered. The use case for hmac is to provide data integrity but also to provide authentication; AKA verifying the data was sent from the right person. This is because only the person with the correct password can produce the hash of the message they sent you.
@theocrob
@theocrob 2 жыл бұрын
I love your videos! You have perfect graphics and damn I love that upload schedule.
@knaz7468
@knaz7468 2 жыл бұрын
The red light green light scene was subtle and terrific. Video taught me a lot as well as per usual.
@gamefun2525
@gamefun2525 2 жыл бұрын
Top tier content. This channel is what I am going to tell people to refer to for any web related knowledge.
@omer0844
@omer0844 2 жыл бұрын
Always makes my day when Fireship uploads. Keep up the amazing work, I learned so much from your channel and website. :)
@WesleyOverdijk
@WesleyOverdijk 2 жыл бұрын
On a side note, the salt works because it makes those rainbow tables useless. It also forces you to make a new table for every user since they all have their own salt. However, storing the salt like that is also not ideal because it makes it easier to use when generating your own tables. So when computing catches up you're more vulnerable in case of a data leak. Best is to also store those salts securely using for example a private key that rotates (updates). Although almost none of us need that level of security it's still fun to think about.
@flodderr
@flodderr 2 жыл бұрын
If a hacker just splits the hash like he did in the code. Isnt that the same as having no salt at all?
@ojtechml
@ojtechml 2 жыл бұрын
@@flodderr yep seems like it.
@gerasTheMessiah
@gerasTheMessiah Жыл бұрын
Joining them with “:” it’s like hinting it a la captain obvious 5:44
@PrinjuVaidyan
@PrinjuVaidyan 2 жыл бұрын
You are so smart...knowing every aspect of this industry Respect bro
@piratacd2005
@piratacd2005 2 жыл бұрын
dude you are awesome, I read a book called Mastering bitcoin and I understood most of this but you just killed it in this short video as always. 🙌🏽
@azatecas
@azatecas 2 жыл бұрын
how do you do those animations at the beginning of every video? it looks so awesome, this is killing me for the last few months
@funkyjoshk
@funkyjoshk 2 жыл бұрын
Check out his second channel 'Jeff Delaney' he provides some good insight over there!
@PatricioHondagneuRoig
@PatricioHondagneuRoig 2 жыл бұрын
This is one of your best videos, hands down. Thanks for sharing Jeff!
@pushock
@pushock 2 жыл бұрын
Thanks a lot, this is very useful! Please keep going! :)
@RudolfKlusal
@RudolfKlusal 2 жыл бұрын
Finaly a video in which the half is not clickbaity claims and explaining what the Byte is ❤ Thank you 🙂
@vighnesh153
@vighnesh153 2 жыл бұрын
"Angular is the best" - Jeff (2nd November 2021)
@c.e.o.9985
@c.e.o.9985 Жыл бұрын
You've summarised entire Internet Security lessons in 11:54 minutes of video. It's incredible 💪
@winken2666
@winken2666 2 жыл бұрын
This helped me a lot when building my own secure signup/signin functionality :) also came in handy when generatinh hash for account activation emails
@edgeofsanitysevensix
@edgeofsanitysevensix Жыл бұрын
I've been a developer 20 years and never seen this topic explained so simply. Even I learned something.
@bbbbburton
@bbbbburton 2 жыл бұрын
I believe browsers do not encrypt using the certs public key, and then the server decrypts. The TLS protocol let's browsers and web servers establish a symmetric key which is used to encrypt and decrypt traffic.
@nagasaipurvaz4251
@nagasaipurvaz4251 2 жыл бұрын
My diploma project is to make hash function for cryptography I took the 256 hash and 512 hash and my collage accepted it ,it was just hashing the hash function again
@santanumukherjee4108
@santanumukherjee4108 2 жыл бұрын
Great content 👌 keep up the good work 👏
@konstantinosbourantas7999
@konstantinosbourantas7999 2 жыл бұрын
Thank you for the great content! 🙏
@nechilion
@nechilion 2 жыл бұрын
One great book about cryptography and steganography (similar techniques to the bald guy moment) is "The Code Book" by Simon Lehna Singh. Highly recommend it as it explains the evolution of this "math thing" from the beginning to our days in a very intuitive and easy-to-understand way.
@Aminsx_
@Aminsx_ 2 жыл бұрын
I'm so early that the video is in 360p edit: superhacker
@RanjanKumar-bu7ws
@RanjanKumar-bu7ws 2 жыл бұрын
Sa.e
@jadeedstoresupport8916
@jadeedstoresupport8916 8 ай бұрын
While I find all Fireship channel's videos useful, this one was especially helpful to me as it allowed me to finally dissolve my chronic confusions about Crypto concepts and gain nice clarity. I found your use of simple yet concrete hands-on examples, your logically moving from one concept to the other (while comparing and contrasting each), and your use of memorable analogies very helpful. Thanks for the good work. God bless.
@skillz7
@skillz7 2 жыл бұрын
Just thinking about cryptography 1 hr ago . This guy is a magician . First I share fireships video than I start watching it
@YandiBanyu
@YandiBanyu 2 жыл бұрын
Haha, that challenge was fast Edit: Also, adding to the awesome video, cryptography, no matter how strong the math behind it is, if badly implemented will still be vulnerable.
@soumyajitdey5720
@soumyajitdey5720 2 жыл бұрын
How did you solve it?
@YandiBanyu
@YandiBanyu 2 жыл бұрын
@@soumyajitdey5720 check the hash type and then use a well known weakness for those hash. It is quite trivial and it shows the point of salting. Spoiler warning!!! . . . . . . . . . . . It is MD5 without a salt and then you just use a lookup table.
@soumyajitdey5720
@soumyajitdey5720 2 жыл бұрын
@@YandiBanyu great! Was thinking along the same lines but you were quicker 😂 Good job! 👏
@YandiBanyu
@YandiBanyu 2 жыл бұрын
@@soumyajitdey5720 I didn't get the challenge either lol. Watched the vid 6 minute after release and the challenge were already solved.
@0jinx
@0jinx 2 жыл бұрын
You just summarized my 3 month university course into 12 min 😂😂😂. I completely love your videos ❤️
@user-ur3gr2qs6i
@user-ur3gr2qs6i 2 жыл бұрын
Great content, keep up the great work. Nobody Boo this man!!
@jannikmeissner
@jannikmeissner 2 жыл бұрын
I am so happy to see this video after the great API video that had the big MD5 problem ;)
@AnesuC
@AnesuC 2 жыл бұрын
I like how no one in the comments mentioned the "the british are coming!" Reference haha
@asdf8asdf8asdf8asdf
@asdf8asdf8asdf8asdf 2 жыл бұрын
Pretty sure if he had put “Let’s go Brandon” there would’ve been some response
@chauffeur1560
@chauffeur1560 2 жыл бұрын
hackers would watch this in reverse
@Drygear1
@Drygear1 Ай бұрын
Very good channel with to the point content, spiced up humor! Thanx!
@carlosdumbratzen6332
@carlosdumbratzen6332 2 жыл бұрын
probably one of the best classes I had in school was when we programmed our of rsa code. The math was really interesting and to implement it in code was also interesting and the usefullness was imeddiately obvious
@vdemcak
@vdemcak 2 жыл бұрын
So early that it's still 360p
@590af
@590af 2 жыл бұрын
Hmmm, That was a lot to "digest"
@abrarshahid3930
@abrarshahid3930 2 жыл бұрын
We want more of such challenges!
@hargunbeersingh8918
@hargunbeersingh8918 2 жыл бұрын
Um that was a whole month of reading articles on cryptography and you summarised that in 10 mins :_) appreciate your skill
@ALXG
@ALXG 2 жыл бұрын
You know you're among the first viewers when you have to watch it in 360p lol 😂
@HECTORARTUROA
@HECTORARTUROA Жыл бұрын
7:45 AES: Advanced Encryptation Standard: many hashes for the same text. 8:30 Public Key Cryptosystem: public key and private key. 9:30 Asymetrics encryptation: https; RSA + SHA.
@danieldosen5260
@danieldosen5260 2 жыл бұрын
watched a couple of videos... top notch on pacing and editing! (and humor).
@jamesf720
@jamesf720 2 жыл бұрын
I needed this video thank you!
@flodderr
@flodderr 2 жыл бұрын
If you store the salt appended to the password like that in the database. And said database gets hacked. Isnt it then super easy for the hacker to do the same split on the colon and run the password hash against the rainbow table again?
@chrissdehaan
@chrissdehaan 2 жыл бұрын
The salt is appended, but then gets mixed together with the password during the hash, so in the final result hash it's all jumbled together. There's no easy way to split it out.
@flodderr
@flodderr 2 жыл бұрын
@@chrissdehaan yea but then he appends the salt to the hashed password and pushes that to the DB. So a hacker has the salt anyway if he sees a colon in the value
@chrissdehaan
@chrissdehaan 2 жыл бұрын
@@flodderr It's not quite in that order. It doesn't go: 1) Hash 2) Append salt It does go: 1) Append salt 2) Hash The salt is appended to the password first, then that whole string is hashed next. That means the salt mixed around through the whole result, and can't be seen or split out easily.
@flodderr
@flodderr 2 жыл бұрын
@@chrissdehaan I understand what you're saying but look at his code again. On the 2nd line of the signup function he does exactly what you say. But then on line 4 of that function he makes a user variable to push to the DB that exists of again the salt + the hash of salt with password. Im confused why he does it like that
@yournerdiness3135
@yournerdiness3135 Жыл бұрын
4:53 for the people confused on this (including past me), scrypt is not just a function for salting hashes, it also takes longer to compute (which it does by basically running SHA a bunch of times). It still only takes a few hundred milliseconds, so it can still be used, but it makes brute force attacks significantly harder.
@sunil5656
@sunil5656 2 жыл бұрын
*Your method of explanation is awesome 👌 👏. We 💖 that*
@yash1152
@yash1152 Жыл бұрын
3:30 thanks for mentioning argon2 - didn't know about this 5:30 timingSafeEqual to prevent timing attack - wow, i had thoughts about that (timing attack) but didn't know it was a real thing
@toniferic-tech8733
@toniferic-tech8733 2 жыл бұрын
It‘s easier to understand the concept of public key, when it is represented with a padlock symbol, rather than a key. The private key then unlocks the closed padlock.
@sergeykosarchuk6388
@sergeykosarchuk6388 2 жыл бұрын
Nice vid 🔥 But I can’t get one thing. Why did you use fixed separator (:) for storing hash and salt? Isn’t it oblivious for the attacker which part is what. Mb better option will be to use fixed length?
@YandiBanyu
@YandiBanyu 2 жыл бұрын
Sure it is oblivious. But to generate the resulting hash, you need to add the salt. This means that a password if hashed (say "abc") will be the result of "abc"+salt. Now if each user has unique salt, it means lookup table attack is pointless and the hacker need to attack each hash independently.
@mikelinsi
@mikelinsi 2 жыл бұрын
@@YandiBanyu and i believed all the time, we should not save Salt in the DB. Just have it in the Application Ram. So if the Database lost. the Salt is independent..
@YandiBanyu
@YandiBanyu 2 жыл бұрын
@@mikelinsi Well, the problem with that is, if you have an upgrade to your application, those salt are lost. Remember, to check the password you need the salt and then hash them then compare the result. Without salt, you cannot check the user anymore. Also, you should use different salt for each user.
@softwarelivre2389
@softwarelivre2389 2 жыл бұрын
It was used as an example. One should use fixed size salts for the reason you showed.
@leisti
@leisti 2 жыл бұрын
It's just a technical detail. If the salt and password lengths are constant, a separator wouldn't be needed. Or they could even be stored in different columns. Doesn't really matter. Also, if using a single field that combines the salt and the hash, trying to depending on an attacker not knowing where in the field the divide is would be a type of security-by-obscurity, which doesn't work anyway, so you might as well put the separator there, for your own convenience.
@sodiumsalt
@sodiumsalt 2 жыл бұрын
This couldn't have come to me at a better time. Thanks!
@speksuperhero
@speksuperhero 2 жыл бұрын
I'm here not for the information but for nice editing 🔥🔥
@sebbes333
@sebbes333 2 жыл бұрын
2:13 -ish. Is "a hash of a hash" more secure than just a simple single "hash"? secret --> hash_1 --> hash_2 is hash_2 more secure than hash_1 ?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Жыл бұрын
Yes. For example, I saw a PHP password algorithm using MD5, which sounds bad. But it iterates the hash 8000 times, which is good. Not suitable for cryptographic message hashes, but good for password hashes.
@miha493
@miha493 2 жыл бұрын
You forget main technology of widely used by both government agents and theirs not so legal opponents for decryption. Thermorectal cryptanalysis is very effective, fast, eco-friendly (because it uses really energy efficient hardware, 50 watt decription device is powerful than enough for most situations) and required relatively low qualification for operators.
@mlgpro6194
@mlgpro6194 2 жыл бұрын
What are u talking about? Xd
@PeterPan-ev7dr
@PeterPan-ev7dr 2 жыл бұрын
Haha thermorectal, all your secrets belong to us 😂
@kimaji
@kimaji 2 жыл бұрын
thanks. this really helped me understand
@bensingleton3128
@bensingleton3128 2 жыл бұрын
I have a midterm for my IT Security class literally tomorrow, this video came out at the perfect time and was a great little review for me. How does Fireship always know exactly what I want when I want it?
@devnol
@devnol 2 жыл бұрын
Jeff is a friend of Zucc so he has all of our data and runs a simulation of all of our brains in virtual machines and can thus determine exactly what video everyone wants at any given time.
@britney_david
@britney_david 2 жыл бұрын
Hello, I'm new to Biticon trade and l've been making huge losses but recently i see a lot of people earning from it. Please can someone tell me what to do?
@Jeffrey_Ambrose
@Jeffrey_Ambrose 2 жыл бұрын
@Kelvin Well, you are saying the fact. I invested $4,000 with Mrs Annabelle Hartfield , and earned $12,000 in 7 working days.
@brucedylan8364
@brucedylan8364 2 жыл бұрын
In Bitcoin investment, determination to take risk is one of the major factor required because it takes a brave heart to make money this days.
@salmakenzie6870
@salmakenzie6870 2 жыл бұрын
Being a newbie in Bitcoin investment and trading is very discouraging but since I met Mrs Annabelle Hartfield , she has really been careful in handling my investment.
@progressj2715
@progressj2715 2 жыл бұрын
Many people are afraid to be invest because of the Scammers in the business
@progressj2715
@progressj2715 2 жыл бұрын
Yes there are scammers in the business just like it's in every other business but there are also legit brokers out there for investors and Mrs Annabelle Hartfield is one of the real and legit brokers out there.
@simonhk
@simonhk 2 жыл бұрын
Great video! Love it very much. By the way, Is it safe to store salt just appending it next to the hashed password?
@khangle6872
@khangle6872 Жыл бұрын
The main point of a salt is to prevent rainbow table That is, because a hashing algorithm will always give the same output for the same input, hacker can just store the before hand. For example: if password "12345" will always be "aRwhY" then a hacker can store this into a database, kinda "oh, using this algorithm, password 12345 will become aRwhY, so everytime i see aRwhY, it must be 12345, no need to decrypt it" However, with salt, every time you type in 12345 as your password, you get a very different hash, so even if a hacker know both the hash and the salt, they cannot guess what the original password is
@KatzeMelli
@KatzeMelli 5 ай бұрын
my lord, it took my professor 3 hours to explain those concepts in a completely messy way. This was clean, comprehensive and to the point. I love the practical application as well.
@_timestamp
@_timestamp 2 жыл бұрын
Laravel in 100 seconds
@anupamdahal7029
@anupamdahal7029 2 жыл бұрын
More Rust, OS tuitorial with Rust
@VivekYadav-ds8oz
@VivekYadav-ds8oz 2 жыл бұрын
I would not rush him with Rust videos, considering that the last one was a catastrophic blunder of misinformation. For Node/JS, no-one comes close to his content.
@VivekYadav-ds8oz
@VivekYadav-ds8oz 2 жыл бұрын
I think you might not be aware of Phil Opp's OS tutorial in Rust. It's a series of articles.
@danbesu
@danbesu 2 жыл бұрын
Hi! This is. so cool! How would it be if you guys made a playlist called "Every dev should know"??
@lucky-segfault4219
@lucky-segfault4219 2 жыл бұрын
Horray, I can now add cyber security expert to my resume. Thanks fireship!
@threesidecreaters2572
@threesidecreaters2572 2 жыл бұрын
A video on making a portfolio website pls. 😭
@TheKrister2
@TheKrister2 2 жыл бұрын
Maybe search first next time? kzbin.info/www/bejne/h2ikgKmNpa6Jfrc
@CarolPLopez-qh9qj
@CarolPLopez-qh9qj 2 жыл бұрын
I'm actually tired of worrying about stocks...it's driving me nuts these days,I think crypto investment is far better than stock..
@wyattwilliam1066
@wyattwilliam1066 2 жыл бұрын
Stocks are good but crypto is more profitable
@evelynhannah3147
@evelynhannah3147 2 жыл бұрын
I'm new to forex trade and I have been making huge losses but recently see a lot of people earning from it.can someone please tell me what I'm doing wrong
@avaelijah5393
@avaelijah5393 2 жыл бұрын
@@evelynhannah3147 All you need now is a professional broker else you gonna continue blowing of your account
@jeremysanchez5545
@jeremysanchez5545 2 жыл бұрын
Mr Dennis services is working for me at the moment and am making good profits from forex and crypto trading.
@user-mc6lh9sf7i
@user-mc6lh9sf7i 2 жыл бұрын
@@jeremysanchez5545 Same here, it’s four months now I started investing with him and it's been good experience
@DaCurse0
@DaCurse0 2 жыл бұрын
You can also just prefix whatever you're hashing with the salt and use any hashing algorithm like that, just make sure to do it when comparing as well.
@evaninadgn
@evaninadgn 2 жыл бұрын
By far my fav channel on KZbin 😍
@kimchang4260
@kimchang4260 2 жыл бұрын
*When it comes to the world of investing,most people don't know where to start.fortunately,great investors of the past and present can provide us with guidance*
@goochoi4928
@goochoi4928 2 жыл бұрын
I'm so happy ☺️ my life is totally changed. I've been earning $10,250 returns from my $4,000 Investment every 13 days
@lucasoliver2378
@lucasoliver2378 2 жыл бұрын
Same here, I made $12,400 profits on investing since I started trading with Mr Grey Smith his trading strategies are too notch am winning consistently trading with Mr Grey Smith . He really the best broker I've made a lot of profit investing with him.
@christophercox6452
@christophercox6452 2 жыл бұрын
I heard a lot of investing with Mr Grey Smith and how good he is, please how safe are the profit?
@melashnikistna2151
@melashnikistna2151 2 жыл бұрын
@@christophercox6452 I trade with him, The profit are secured and over a 100% return on investment directly sent to your wallet.
@feliciaputri123
@feliciaputri123 2 жыл бұрын
After watching so many KZbin tutorial videos about trading I was still making losses untill Mr Grey Smith started managing my investment now, I make $6,800 weekly. God bless Mr Grey Smith . His been a blessing to my family.
@jeromehill6326
@jeromehill6326 2 жыл бұрын
Investing in crypto now should be in every wise individuals list, in some months time you'll be ecstatic with the decision you made today.
@alonzovancleve7717
@alonzovancleve7717 2 жыл бұрын
Most intelligent words I've heard.
@rickkurt2772
@rickkurt2772 2 жыл бұрын
I got Mrs Tracy Britt Cool info, how good is she ?
@rickkurt2772
@rickkurt2772 2 жыл бұрын
@Mickey Paul Thanks i did a NetSearch on her out of curiosity and my findings on her surpass my expectations. I've drop words on her reachout
how to never write bug
7:20
Fireship
Рет қаралды 810 М.
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 1,9 МЛН
How to Sneak Make Up Into Class 💄 #shorts
00:30
BubbleBee
Рет қаралды 14 МЛН
Иран ударил по израильскому аэропорту
00:14
TRT на русском
Рет қаралды 3,7 МЛН
AES Explained (Advanced Encryption Standard) - Computerphile
14:14
Computerphile
Рет қаралды 1,2 МЛН
7 Security Risks and Hacking Stories for Web Developers
9:00
Fireship
Рет қаралды 514 М.
10 Math Concepts for Programmers
9:32
Fireship
Рет қаралды 1,7 МЛН
How Quantum Computers Break The Internet... Starting Now
24:29
Veritasium
Рет қаралды 8 МЛН
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,1 МЛН
10 weird algorithms
9:06
Fireship
Рет қаралды 1 МЛН
SHA: Secure Hashing Algorithm - Computerphile
10:21
Computerphile
Рет қаралды 1,2 МЛН
Password Storage Tier List: encryption, hashing, salting, bcrypt, and beyond
10:16
I tried 10 code editors
10:28
Fireship
Рет қаралды 2,8 МЛН
The Pen That Changed The World
9:17
Primal Space
Рет қаралды 41 М.
Iphone yoki samsung
0:13
rishton_vines😇
Рет қаралды 8 МЛН
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Рет қаралды 861 М.
Секретная функция ютуба 😱🐍 #shorts
0:14
Владислав Шудейко
Рет қаралды 728 М.