What is bcrypt & pbkdf2 & password security in general? - npm Weekly Highlights
Вставка
- Опубліковано 5 вер 2024
- Going into bcrypt and the native node core method for pbkdf2 as well as password security in general, salts, storage and why not to use things like md5.
ZDNet article: zdnet.com/arti...
bcrypt: www.npmjs.com/...
npm crypto.pbkdf2: nodejs.org/api...
NIST Password Guidelines: nvlpubs.nist.g...
Great overview! A lot of the concepts and the way these "salted" hashing algorithms work are now much clearer in my head. Thank you for that. I do teach a tiny bit of very basic cryptography in my Technology classes in the school where I work, so now the students will (hopefully) get a better explanation from me :)
I remember when I first even heard of md5, probably about 7 years ago
2 things I find useful. One is the visualized test of bcrypt and pbkdf2 speed. And I get to know these two function's signature from the video. Not so bad~
Good overview, thanks for sharing!
Thank you so much - a great explanation - very much appreciated.
Oh man video is so hard. There are so many times where I think "I didn't use the exact right word here, here, and here. I guess I should just scrap everything and reshoot."
You did great
The message went through. That's all that matters. If you reach at least one person for this subject that's already good !
4:40 Before a hashing function becomes too slow to impede user experience, it becomes a DoS vector.
6:14 Bcrypt appears exponential because, the ExpandKey function is applied 2^cost times. PBKDF2 applies the PRF only *cost times therefore, it is not reasonable to compare these
8:58 I find 50K iterations is best for PBKDF (takes about 72ms to compute on CPU)
Great video, thanks a lot!
Thanks!
Thanks, this was really useful, good luck on the rift!
Thank you, what a great video !
Why do these libraries even use async ? Isn't this a cpu intensive process ?
Isn't this the perfect use case for async? Javascript starts the cpu intensive task and instead of waiting just for that task to complete, it moves on to the next task with promise waiting to receive the output?
Saying “just” Don’t use SHA is unclear. You were using SHA512 in your example code. 9:41
Great explanation. So what is this HMAC thing??
So as a Web Dev, and seeing a lot regards to password hashing. I'd thought I would way in here. So when it comes to password hashing there is a difference between crypto graphical secure and suitable as a password hashing algorithm.
The difference, just because something is regarded as cryptographically secure doesn't mean it is suitable as a password hashing algorithm. This is due to a time cost and how that translates....
MD5 is not a secure algorithm due to it being so broken, reduction in entropy, rainbow tables, pre-image, collisions attacks is why you should never use it not to mention how fast md5 hashes can be produced
SHA families of algorithms are cryptographically secure but are simply too fast. These are used for producing fast hashes of data to determine if the data is different from another state, ie downloaded update has a different hash from what the site/service says that hash should be...dont install that update or program.
The only 2 password hashing algorithms to be used now unless there is some new ones, is BCrypt and SCrypt, this is because they are slow to compute in both CPU and GPU and allows and exponetial cost factor for future proofing, that is why those algo's are designed to be.... slow, and costly
As for plaintext storage, this is in most countries under law ia illegal.
slow, why slow ?
All password hashes can be broken, by simply computing every input to match against thee output hash (what was hacked, downloaded, SQL injection commonly, the user table containing the password hashes). The slower the hash, the slower the breaking, the more time it takes for a computer to break a hash ie match the input against the target, the longer the time the more the computer runs for, the more it costs in electricity bills to break each password in a hacked DB
For any hash to be obtained it is either the DB (user or usertable) was downloaded or the login mechanism failed to implement a time limit for subsequent failed attempts (always cap the max time before another attempt, looking at your iPhone, legit mechanisms can be exploited for DoS attacks easily).
md5 was crackable in like 2005 or before lol
Gilfoyle's brother
Just be honest. They are plain lazy.