4 ms·
Bcrypt is now obsolete
- Tichy 18y agoI don't know this guy. Probably he is really famous (?), but I'd rather wait until his scrypt sees widespread adoption before I follow his lead.
- cperciva 18y agoI don't know this guy. You do now. :-)
- Tichy 18y agoHello :-)
- Confusion 18y agoHas anyone besides yourself yet vetted this 'key derivation function' (and perhaps you wouldn't mind shortly explaining the difference between a KDF and a cryptographic hash function)?
- cperciva 18y agoHas anyone besides yourself yet vetted this 'key derivation function' Not yet. perhaps you wouldn't mind shortly explaining the difference between a KDF and a cryptographic hash function Cryptographic hash functions produce fixed-length collision-resistant output, ideally as fast as possible. KDFs can normally produce arbitrary lengths of output, and don't need to be fast -- in fact, being fast is a disadvantage, since secure KDFs are expensive to compute (because they need to resist brute-force attacks).
- RiderOfGiraffes 18y agoI appreciate your scepticism, but you might do some homework before revealing or announcing ignorance. cperciva is well-known in the relevant fields, and while it may yet be that scrypt doesn't get widely adopted, it won't be because it's not a secure system.
- _pius 18y agocperciva is well-known in the relevant fields, and while it may yet be that scrypt doesn't get widely adopted, it won't be because it's not a secure system. I'm assuming what you meant to say is "it won't be because cperciva doesn't know what he's doing."
- RiderOfGiraffes 18y agoThat's possibly a better way of phrasing it - thank you. Crypto is notoriously difficult, and it's clearly prudent to wait and see what others say, and how it works. It actually misses my intended point, though. This forum is generally exceptional in the quality of its submissions and comments, which is what makes it even more annoying when someone says: I don't know this guy. Probably he is really famous (?), but ... This amounts to saying "I don't know what I'm talking about, and I'm not going to bother doing any homework before making my ignorance known to you all ..."
- Tichy 18y agoNo it doesn't. What I was saying is that the word of one person is not sufficient in such matters, no matter how famous the person. Hence there is (imo) no need to do homework on the popularity of the person. I could have done homework on the community opinion towards scrypt, however, I was commenting on the article (which did not cite any community opinions), not on the validity of scrypt. Therefore that kind of homework would not have been necessary in my opinion.
- RiderOfGiraffes 18y agoFWIW, I agree entirely that the word of one person isn't enough in matters of crypto and security. I probably agree entirely with most comments on the actual issues of security, etc. However, it seemed to me from your original comment that you proclaimed ignorance and didn't do any homework. I feel that that is at odds with what is expected of this community. Perhaps I'm wrong, and I'll say no more.
- 18y ago
- wooby 18y agoHe's the dude who made all the builtin scripts on FreeBSD that are also in OS X, duh! file /usr/bin/* | grep Bourne | cat `cut -d: -f1` | grep cperciva
- cperciva 18y agoIf you have the same OS X as the system I just looked at, it's just several hard links to the same script... and it's a very small script, too.
- kubrick 18y agoIn the world of encryption algorithms, you never, ever assume that some guy's new scheme is bullet proof. It takes years of testing before you can firmly say that an algorithm doesn't have weaknesses. This guy, by announcing that his brand new algorithm just made bcrypt obsolete, is only showing his ignorance.
- tptacek 18y agoIf you could come up with a less bait-y title, I'd agree with you. :) We'd use the term "adaptive hashing" or (less accurately) "key strengthening", but it wouldn't be actionable. Bcrypt is actually still current, since very few stable implementations exist for your algorithm, and you are surely not recommending people implement their own crypto. It's good work though, and I look forward to recommending it, when it becomes reasonable to do so.
- zackattack 18y agoI think we should do something about the bait-y titles on HN in general. Titles should be descriptive and succinct. Maybe a better title here would have been "bcrypt's use of MD5 makes it insecure compared to scrypt". (I don't know how to best word the title; I would have not submitted the article, since I'm not an expert on security.)
- cperciva 18y agobcrypt's use of MD5 makes it insecure compared to scrypt bcrypt is a key derivation function, like scrypt. It's openssl which bogusly uses MD5 as a key derivation function.
- tptacek 18y agoIn case Colin's response wasn't clear enough: bcrypt doesn't use MD5 at all. It's a hack that uses Blowfish (an algorithm that is notoriously slow to "start up") where old Unix used DES, and tweaks the algorithm's startup to make it tuneably slower. It's a hash function with a crypto-strong drag factor. A massive improvement in MD5's speed would be a win for MD5. bcrypt (and scrypt) are designed to stay on the opposite side of that tradeoff.
- davidmathers 18y agoI think we should do something about the bait-y titles on HN in general. Titles should be descriptive and succinct. Sometimes the same story is posted multiple times. One post will have a bait-y title and the other will have a boringly accurate and truthful title. Of those two, one of them always disappears with 3 or 4 votes and the other climbs the front page charts. Exhibit A: A Comparison of Approaches to Large-Scale Data Analysis: MapReduce vs. DBMS vs. Parallel DBMSs faster than MapReduce Then there are the science articles with accurate titles and hypetastic titles. Exhibit B: Long-Distance Teleportation Between Two Atoms Achieved vs. Scientist Teleport Matter More Than Three Feet So, it's not like the descriptive titles aren't already there waiting to be promoted, it's just that hyperbole always wins in the marketplace of up-arrow clicks.
- utnick 18y agothis means that a five-character password using scrypt is stronger than a ten-character password using openssl. Not a crypto expert, but don't most people crack passwords by just running common words or every possible combination of N characters through your encryption system, therefore as long as your encryption mechanism is good enough it doesn't matter what you use?
- pmjordan 18y agoNot a crypto expert either, but I took this to mean that each attempt in a brute force attack is orders-of-magnitude more costly, so that trying all combinations of 5-character scrypt passwords takes as long as trying all 10-character combinations with bcrypt.
- cperciva 18y agoThat's almost correct. Replace "takes as long as" with "costs as much as" and you'd be exactly right. Basically what it comes down to is that with bcrypt (and all the other widely used KDFs) it's vastly cheaper to attack the KDF with a custom circuit than it is to buy general-purpose computers and run a software key cracker. With scrypt the advantage that TLAs with ASICs have is much smaller.
- judofyr 18y agoif scrypt is more than twice as slow as openssl, wouldn't that make it stronger?
- jwr 18y agoI would really like to see Bruce Schneier's opinion on this.
- dfranke 18y agoUh, why him in particular? There are other competent cryptologists out there, y'know :-)
- pookleblinky 18y agoSquids.
- ralph 18y agoWell, if Bruce passed comment on it, it would be publicity, bringing it to the attention of many that would be interested.
- brl 18y agoHe called it pointless 'security theater' and recommended using a faster algorithm like MD5 to reduce delays at security checkpoints since terrorists will just print their own boarding passes anyways.
- Confusion 18y agoHe would call it that when applying this solution to that specific problem. In general, I don't think he would say that when the proposal is that people should use scrypt to hash the passwords they store.
- ralph 18y agoFor those that don't know, Bruce Schneier designed http://en.wikipedia.org/wiki/Blowfish_%28cipher%29 http://en.wikipedia.org/wiki/Blowfish_%28cipher%29
- amix 18y agoIt's stated that scrypt is 4000 times harder to break than Bcrypt (I don't know how this is calculated, so it's probably an estimate). Given that password cracking can be easily parallelized is this enough of an improvement?
- lisper 18y agoDid you read the paper? The whole point of the thing is to make it non-parallelizable. That's what makes it hard.
- amix 18y agoI did not read it, but I can't imagine what would prevent an attacker from running a parallel attack on multiple circuits/computers that aren't sharing any resources...
- dfranke 18y agoThe idea is to make the KDF expensive in space as well as time. While bcrypt costs a few seconds of CPU time, it uses only a tiny amount of RAM, thus underutilizing the resources you have available. Thus, you can parallelize an attack using lots of specialized ASICs but only a commodity amount of storage. Scrypt would require you to purchase lots of RAM for every ASIC, making a brute force attack much more costly.
- cperciva 18y agoThus, you can parallelize an attack using lots of specialized ASICs... More to the point, you can parallelize attacks on most KDFs by building an ASIC with many copies of a password-cracking circuit. With scrypt, the vast majority of the IC area (and thus cost) is RAM.
- brl 18y agoSince you have an implementation I don't have to manually extract from a library deep inside the OpenBSD source tree I think I'm going to take a look at replacing bcrypt in an application I'm working on.
- asmosoinio 18y agoA side note: The name "scrypt" is no so good in terms of googling. A search for example for "scrypt python" brings up over 7 million hits for Python script. Maybe once more pages about scrypt exists it will stand up, but anyway the name could be more unique.
- whatusername 18y agoTry this.. http://www.google.com/search?q=%22scrypt%22+python http://www.google.com/search?q=%22scrypt%22+python Search for "scrypt" python
- asmosoinio 18y agoI know, but it brings 2710 results, and I am pretty sure the link to my and your comment (number 5 and ~15 in Google) are the only one related to this derivation function.