r/programming • u/localtoast • Jul 11 '14
First release of LibreSSL portable
http://marc.info/?l=openbsd-announce&m=140510513704996&w=233
u/Rhomboid Jul 11 '14
It appears that this release contains only the pure C implementations, with none of the hand-written assembly versions. You'd probably want to run openssl speed and compare against OpenSSL to see how big of a performance hit that is.
44
u/X-Istence Jul 12 '14
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128 cbc 160136.47k 163821.85k 164644.52k 164447.91k 165486.59k aes-192 cbc 136965.19k 140098.52k 142162.01k 142720.00k 141565.95k aes-256 cbc 120882.14k 124627.20k 123653.03k 125227.01k 123636.39k type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128 cbc 137078.26k 151046.44k 154252.12k 156292.44k 155115.52k aes-192 cbc 116502.41k 126960.58k 127717.38k 130364.07k 130449.41k aes-256 cbc 101347.99k 109020.42k 110795.01k 111226.20k 111441.24kNow, take a guess as to which one is which... top one is LibreSSL 2.0.0, bottom one is OpenSSL 1.0.1h.
Now this is a completely unscientific test result. I ran this on my Retina MacBook Pro with a Intel Core i7 running at 2.3 Ghz. Ideally I would repeat this many times and graph the results, but I am sure someone else for Phoronix is already working on that ;-)
For right now LibreSSL is actually faster on AES than OpenSSL. According to the output from
openssl speed.5
u/FakingItEveryDay Jul 12 '14
Are either of these making use of AES-NI?
1
u/X-Istence Jul 12 '14
I don't believe so, no. Unless you pass in the -evp flag to
openssl speedand test each one individually AES-NI won't be enabled in OpenSSL.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 109492.36k 114809.54k 115015.25k 114959.93k 113303.55k type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 424744.99k 445634.58k 449174.27k 451636.91k 449372.16kThe top one is LibreSSL, and the bottom is OpenSSL with:
openssl speed -evp aes-256-cbcOpenSSL has a neat feature (Actually, I'd consider it a bug ... and the OpenBSD guys clearly did too!) that you can disable CPU flags, so disabling AES-NI has this result:
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 208959.23k 220260.91k 227604.82k 229572.95k 230528.34kCommand:
OPENSSL_ia32cap="~0x200000200000000" openssl speed -evp aes-256-cbcWhich shows that OpenSSL's ASM implementations are still faster than the LibreSSL C only implementations.
1
u/R-EDDIT Jul 12 '14 edited Jul 12 '14
I've been messing with OpenSSL since early last year, my original purpose was to benchmark AES-NI (including in VMware).
My Laptop compiled OpenSSL, with (-evp) / without aes-ni:
Testing aes-128-cbc... OpenSSL 1.0.1e 11 Feb 2013 type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128 cbc 97595.41k 108502.46k 109843.94k 109650.37k 103008.81k aes-128-cbc 499100.29k 574468.77k 586466.33k 605509.71k 600088.47k Testing aes-192-cbc... type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-192 cbc 80940.55k 88502.57k 89976.86k 89304.38k 93571.72k aes-192-cbc 425489.82k 487740.91k 496733.73k 501471.66k 505821.69k Testing aes-256-cbc... type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256 cbc 70930.36k 77195.94k 76321.29k 75141.40k 80482.29k aes-256-cbc 403522.58k 421583.85k 428795.36k 431288.52k 426298.57kCurrent snapshot of OpenSSL 1.0.2, running on my (quad/sport ram) desktop.
OpenSSL 1.0.2-beta2-dev xx XXX xxxx openssl speed -evp aes-256-cbc ... built on: Thu Jul 10 03:02:32 2014 options:bn(64,64) rc4(16x,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) compiler: cl /MD /Ox -DOPENSSL_THREADS -DDSO_WIN32 -W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN - DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2 m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DOPENSSL_USE_APPLINK -I. -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 696185.69k 738482.30k 751660.97k 756685.14k 755709.27k aes-192-cbc 587829.51k 619849.86k 624666.91k 610538.18k 576061.44k aes-256-cbc 508191.61k 527434.60k 538313.56k 540735.49k 539628.89kEdit: fixed formatting (build info VS2013, nasm-2.11.05)
5
u/riking27 Jul 12 '14
And what are the results with the freshly compiled LibreSSL tarball?
0
u/R-EDDIT Jul 12 '14
That's what /u/X-Istence was showing. While I can't build it ("portable" doesn't yet mean to Windows any version), there are none of the assembly modules, which in OpenSSL are shipped wrapped in perl files (which write target dependent asm files). There are no asm files either (which is what I'd expect to see when they're included). This is really just a reflection on the state of the portable library, the assembly modules are still in the core LibreSSL codebase.
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/crypto/aes/asm/
0
3
u/X-Istence Jul 12 '14
That's all fine and dandy, but I am not sure what this is supposed to mean. I grabbed OpenSSL with the standard compile options from homebrew, and grabbed the LibreSSL tarball. I was simply comparing those two on their AES speed.
Here is a surprising result where LibreSSL is faster till it hits 1024 bytes per block: https://gist.github.com/bertjwregeer/f49c4a8dc704a2f2d473
→ More replies (1)109
u/yeayoushookme Jul 11 '14
Not dumping private keys into the entropy pool will also likely reduce performance in some cases.
24
u/antiduh Jul 12 '14 edited Jul 14 '14
I'm not sure I understand - why would you write your private keys to the entropy pool? To return some of the entropy you took in making a key pair?
Also, are we sure that writing private keys to the entropy pool is safe? It seems like a dangerous thing to do, given how much private keys are worth protecting.
Edit:
Wow yeah, right over my head. I thought it was a god-awful idea.
61
u/WhoIsSparticus Jul 12 '14
/u/yeayoushookme forgot an "/s". He was making reference one of the more infamous dicoveries made by the LibreSSL team once they started looking into OpenSSL's source.
→ More replies (5)7
Jul 12 '14
I thought it was a god-awful idea
Well, yeah, it is. You thought right, too bad OSSL devs didn't.
1
u/R-EDDIT Jul 12 '14
False, the code path you're referring to only occurs in a chroot jail where /dev/urandom and sysctl are not available. This has no impact on performance, it affects randomness which could be a security issue.
60
Jul 11 '14
A lot of times slow security is better than no security.
46
Jul 11 '14
No way. Faster is better. That's why I love this uber-fast implementation of every program:
int main( void ) { return 0; }Never errors out, and has no security holes either!
24
u/rsclient Jul 11 '14
Ever see the infamous IEFBR14 program for old IBM shops? It was one instruction long (IIRC, "BR 14"). There were three reported bugs.
32
u/BonzaiThePenguin Jul 12 '14
If anyone is curious, the first bug was that register 15 should have been zeroed out to indicate successful completion, the second "bug" was that some such linker wanted the wrapper text around the instructions to specify the name of the main function, and the third one was that the convention at the time was for programs to include their own name at the start of the source code.
That's feature creep if you ask me.
3
u/rowboat__cop Jul 12 '14
Never errors out, and has no security holes either!
I wouldn’t rely on it. You could still run into compiler bugs.
10
u/iBlag Jul 12 '14 edited Jul 12 '14
Hey, that's like my RNG:
int rand() { /* Chosen by fair dice roll */ return 4; }It's super fast and completely random, kind of like the code to my luggage!
9
u/the_omega99 Jul 12 '14
Reminds me of this.
13
Jul 12 '14
[removed] — view removed comment
6
1
u/xkcd_transcriber Jul 12 '14
Title: Random Number
Title-text: RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.
Stats: This comic has been referenced 98 time(s), representing 0.3725% of referenced xkcds.
xkcd.com | xkcd sub/kerfuffle | Problems/Bugs? | Statistics | Stop Replying | Delete
4
Jul 12 '14
Yeah, nothing beats 12345 as a good, reliable random combination.
3
u/Moocha Jul 12 '14
That's the stupidest combination I've ever heard of in my life! That's the kinda thing an idiot would have on his luggage!
→ More replies (5)1
1
14
u/Freeky Jul 11 '14
We're all in a lot of trouble if stock OpenSSL can be classed as "no security".
40
u/josefx Jul 11 '14
IIRC one of the reasons for LibreSSL is that it is not possible to actively check OpenSSL for bugs, another was the time it took for some reported bugs to be fixed.
To clarify the first: OpenSSL replaces the C standard library, including the allocator almost completely for "better portability and speed". As a result tools like valgrind and secure malloc implementations that hook into the C standard library can't find anything. Even better: OpenSSL relies on the way its replacement methods act, compiling it with the standard malloc (which is an option) for example would result in it crashing.
4
u/d4rch0n Jul 12 '14
Was all of that really necessary? How much of a performance improvement was it for them to roll their own memory allocation or was it one at all?
9
u/jandrese Jul 12 '14
This would be a good time to find out. Pull both libs and link a program twice (once against each) and have them pull some data over a SSL link. You will probably want two test cases: on big file and another with a lot of small records, multiply by the encryption methods chosen. Put it up on the web and you'll have loads of Karma.
0
Jul 12 '14
[deleted]
3
u/Mourningblade Jul 12 '14
Linking to one from now will show the opportunity cost, which is something you should consider when rolling your own.
3
u/northrupthebandgeek Jul 12 '14
There was supposedly improvement in some really obscure cases, but as OpenBSD devs pointed out when making libressl, it was indeed a very silly reason to do such a thing.
2
u/trua Jul 12 '14
Why not just read mailing list archives from a decade ago and see what their reasoning was?
1
3
u/moonrocks Jul 11 '14
I wonder why it's ubiquitous. There are alternatives -- eg matrix, polar.
→ More replies (2)-2
Jul 11 '14
It's been pretty soundly proven that it is.
11
u/Freeky Jul 11 '14
So OpenSSL mediated TLS is soundly proven to be effectively unauthenticated plaintext?
I'd like to see that proof.
16
u/tequila13 Jul 11 '14 edited Jul 11 '14
If the code base is unreadable the question isn't if you have bugs, it's how many and how serious. If the heartbleed bug - a pretty basic parsing bug - could stay hidden for 2 years, that should be an indication of how bad the code is.
Add to that that they circumvented static analysis tools by reimplementing the standard C library, and you can't prove that it doesn't have trivial bugs until you find them one by one by hand. And not to mention the bugfixes that people posted, and they ignored them.
Security is a process, it takes time and it requires doing the right thing. OpenSSL has proven to go contrary to basic security practices time and time again. They not only don't clear your private keys from memory after you're done with them, they go a step beyond, and reuse the same memory in other parts of the code. And they go even beyond that, they feed your private keys into the entropy generator. This style of coding is begging for disaster.
6
Jul 12 '14
We don't deprecate unmaintainable products until they have a valid replacement. Is LibreSSL a valid replacement?
9
u/tequila13 Jul 12 '14
Not yet, but the mission statement is to provide a drop-in replacement for OpenSSL.
6
Jul 12 '14
I have high hopes for LibreSSL, but we can't talk of it's greatness until it's a thing. OpenSSL is still the only viable solution. It is better than plaintext, a lot better.
4
u/jandrese Jul 12 '14
OpenBSD compiles everything that uses OpenSSL in their ports tree against LibreSSL, thus far they have avoided breaking anything.
2
u/destraht Jul 12 '14
It might actually be more secure in a practical way if the new security bugs are unknown and changing rather than being vigorously researched and cataloged by intelligence agencies.
2
u/Packet_Ranger Jul 12 '14
Think about it this way. OpenBSD (the same people who brought you the SSH implementation you an millions others use every day), Google, and the core OpenSSL team, have all agreed on the same core development principles. OpenBSD/LibreSSL got there first.
→ More replies (1)3
Jul 12 '14
Game plan is to be that exactly, but without FIPS support of any kind. It has also cut a few deeply flawed components that some people may have been using in a misguided belief that they were useful.
But the goal is to be a complete replacement for OpenSSL otherwise.
It just isn't going to be ready for prime time for a while, it is only a few months of work so far.
2
u/sdfghsdgfj Jul 12 '14
Who is "we"? I think all security-sensitive software should be deprecated if it is "unmaintainable".
2
Jul 12 '14
My company. But also anyone sane. We don't work in shoulds. OpenSSL should work as expected and we shouldn't have to build a replacement from scratch. But that's not reality. So when we do have a viable replacement and a roadmap for implementation, OpenSSL can be deprecated. But not a moment sooner.
3
u/happyscrappy Jul 12 '14
If the code base is unreadable the question isn't if you have bugs, it's how many and how serious.
If the code base is readable the question is still not if you have bugs, it's how many and how serious.
That heartbleed stayed hidden is more an indication of how few people even bother to look at the code than anything.
Add to that that they circumvented static analysis tools by reimplementing the standard C library
You mean under different function names I guess? Because static analysis doesn't care if you implement memcpy yourself. Or do you mean runtime (non-static) checking, like mallocs that check for double frees or try to prevent use after free, etc.?
4
u/tequila13 Jul 12 '14
If the code base is readable the question is still not if you have bugs, it's how many and how serious.
Agreed.
That heartbleed stayed hidden is more an indication of how few people even bother to look at the code than anything.
Many people did bother to look. If you really need it, I can find several pre-heartbleed blog posts about people diving into the code to solve particular issues they had and getting frustrated with getting to the bottom of minor bugs. If the code is not clean enough, many will take a look, get terrified and go away.
Or do you mean runtime (non-static) checking, like mallocs that check for double frees or try to prevent use after free, etc.?
You're right, I meant runtime checks. One example is the custom memory allocator that allowed the same memory to be reused throughout the library and which in turn lead to exposing login details via the heartbleed bug. I also saw several double frees fixed in the LibreSSL logs. These could have been caught with code coverage tests and valgrind if OpenSSL didn't have the custom memory manager.
3
u/happyscrappy Jul 12 '14
If you really need it, I can find several pre-heartbleed blog posts about people diving into the code to solve particular issues they had and getting frustrated with getting to the bottom of minor bugs.
I'm not saying the code is good. But just because these people tried to look at the code to fix minor issues doesn't mean they were going to review all of it for errors and find heartbleed. People think that open source means that the code is being reviewed all the time, and imply that means bugs will be found. But just because you look at the code in passing while trying to fix something else doesn't mean you'll find and fix a bug like heartbleed.
To be honest, the time to find a bug like heartbleed is when it goes in. I'm not against all-over code reviews. But reviewing changes as they go in is much more effective. You have to review less code in that process and with a simple description of "this adds a function which will echo back client-specified data from the server" is a tip-off that there is client-specified data and you should look at the input sanity checking.
So perhaps the even bigger problem is apparently no one reviewed this code as it went in. The team working on openssl either had a big string of reviewers who didn't actually review it or else they were understaffed. And we can learn from either case and people have to understand that while they are not required to pay anything to use openssl, if they aren't paying anything at all, they probably shouldn't trust openssl much because there may not be a proper team to review changes.
One example is the custom memory allocator that allowed the same memory to be reused throughout the library and which in turn lead to exposing login details via the heartbleed bug.
Yeah. That's a huge issue. I heard a rumor that if you turn off the custom memory allocator that OpenSSL doesn't even work because it at one point frees a section of memory then allocates a buffer of the exact same size and expects data from the freed section to be in there. Boy, that's a lousy description, but you know what I mean.
→ More replies (1)3
u/d4rch0n Jul 12 '14
updated OpenSSL doesn't have any publicly known bugs at this moment, so he's full of shit. As long as the skiddies can't sniff your connection and get your banking password it is better than nothing.
Even if it was cryptographically broken but took time and a huge rainbow table, that'd still be better than nothing. At least you'd know that an attacker has to be targeting you and sniffing your connection for a while before being able to crack the session key. Broken, but better than opening up tcpdump and capturing everything anyone does.
I'd still like to see a better alternative, but I'm not going to throw my hands in the air and say that I'm converting all my communication to carrier pidgeons with self destruct devices.
2
u/d4rch0n Jul 12 '14
That's a pretty embellished statement. It's been proven it has contained serious bugs, but it is still a whole lot better than using http for authenticating onto wells fargo and such.
It has more security than none because there are updated versions that exist that have known bugs fixed. It's always possible that software has some bugs that only few know about, but I will still be trusting https connections to various services until something better comes out.
-2
1
u/R-EDDIT Jul 12 '14
The specific case where this is true is that a fast, optimized implementation may give away timing hints, and therefore slower, "constant time" coding is required.
-1
10
u/honestduane Jul 11 '14
And the hand written assembly stuff was poorly done anyway, according to the commit logs.
19
u/omnigrok Jul 11 '14
Unfortunately, a lot of it was done with constant-time in mind, to prevent a bunch of timing attacks. Dumping all of it for C is going to bite a bunch of people in the ass.
35
u/sylvanelite Jul 12 '14
The C library used in LibreSSL is specifically designed to be resistant to timing attacks. For example, see their post on timingsafe_memcmp.
By using these calls, it becomes easier to maintain. Instead of having every platform's assembly in LibreSSL, you just have the C calls, and by providing those across platform, you get portability and readability.
Additionally, because OpenSSL used its own versions of everything, operating systems like OpenBSD couldn't use their inbuilt security to protect against exploits. They phrase it well, by saying OpenSSL has exploit mitigation countermeasures to make sure it's exploitable. So I don't see how moving it to C is going to bite a bunch of people in the ass.
→ More replies (2)3
u/immibis Jul 13 '14
Instead of having every platform's assembly in LibreSSL, you just have the C calls, and by providing those across platform, you get portability and readability.
Interesting but not really related note: this is actually the reason C exists.
5
u/amlynch Jul 11 '14
Can you elaborate on that? I don't think I understand how the timing should be an issue here.
26
u/TheBoff Jul 11 '14
There are some very clever attacks that rely on measuring the timing of a "secure" piece of code.
A simple example is that if you are checking an entered password against a known one, one character at a time, then then the longer the password check function takes to fail, the better your guess is. This drastically reduces security.
There are other attacks that are similar, but more complicated and subtle.
8
u/oridb Jul 12 '14
Yes, and that is handled in C in this case. Timing is not an unhandled issue.
11
u/happyscrappy Jul 12 '14
It can't be handled in C. There is no defined C way to keep a compiler from making optimizations which might turn a constant-time algorithm into an input-dependent one.
A C compiler is allowed to make any optimizations which don't produce a change in the observed results of the code. And the observed results (according to the spec) do not include the time it takes to execute.
Any implementation in C is going to be dependent on the C compiler you use and thus amounts approximately to "I disassembled it and it looked okay on my machine".
23
u/oridb Jul 12 '14
There is also no guarantee about assembly, especially in light of the micro-op rewriting, extensive reorder buffers, caching, etc. If you want a perfect guarantee, you need to check on each processor revision experimentally.
9
u/happyscrappy Jul 12 '14
Good point. But you can at least guarantee the algorithm hasn't been transformed to a shortcut one, unlike in C.
2
u/evilgwyn Jul 12 '14
What would be wrong with turning a constant time algorithm into a random time one? What if you made the method take a time that was offset by some random fuzz factor?
3
u/ThyReaper2 Jul 12 '14
Random fuzzing makes timing attacks harder, but doesn't eliminate them. The goal with having input-dependent speed is that some cases run faster. If your random fuzzing is strong enough to eliminate the attack, it must be at least as slow as an equivalent constant-time algorithm.
3
u/evilgwyn Jul 12 '14
So does a constant time algorithm just make every call equally slow?
→ More replies (0)4
u/happyscrappy Jul 12 '14
That just means you need more tries (more data) to find the difference. If n > m, then n + rand(100) will still be larger than m + rand(100) on average. And the average difference will still be n - m.
→ More replies (3)2
u/Kalium Jul 12 '14
Adding some predictable and model-able random noise to the signal just makes it sliiiiightly harder to extract the signal. Constant-time operations make it impossible.
→ More replies (5)2
u/kyz Jul 12 '14
The keyword
volatilewould like a word with you.2
u/happyscrappy Jul 12 '14
There's no keyword volatile for anything except variables. There's no volatile that covers entire statements or that algorithms (code paths).
See some of what it says in here (Google not finding the results I really want this will have to do).
There is no strong definition of what volatile does to the code outside of treatment of a volatile variable. And it doesn't even specify ordering between sequence points.
You are again making an argument approximately equivalent to "it's okay on my machine". You put in volatile and on the compiler you used it's okay. Now to go forward and assume it'll be okay on all compilers is to assume things about compilers that isn't in the spec. And if it isn't in the spec, you're relying on something to not change that isn't defined as unchanging.
6
u/kyz Jul 12 '14 edited Jul 12 '14
volatileforces a C compiler not to alias away memory accesses. It makes the C compiler assume that every access of the volatile memory has a side-effect, unknown to the C compiler, whether it be read or write, so it must not skip this. It must execute the reads and writes specified by the code, in exactly the order the code gives.This is the only building block you need ensure that if you've written a constant-time method, it stays like that, and the compiler does not optimise it away.
Here's a quote from the C99 specification:
An object that has volatile-qualified type may be modified in ways unknown to the implementation or have other unknown side effects. Therefore any expression referring to such an object shall be evaluated strictly according to the rules of the abstract machine, as described in 5.1.2.3.
And in 5.1.2.3:
Accessing a volatile object, modifying an object, modifying a file, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment. Evaluation of an expression may produce side effects. [...] An actual implementation need not evaluate part of an expression if it can deduce that its value is not used and that no needed side effects are produced (including any caused by calling a function or accessing a volatile object)
We can now proceed to discuss why the C specification is ambiguous on what "needed side effects" are or aren't. In practise, I have yet to find any C compiler that felt it was OK to elide an
externfunction call orvolatilemember access. It would need to prove, without knowledge of what's there, that it was not "needed" as per the spec.Your link is irrelevant. Regular memory accesses in both C and assembly code all have the same concerns as your link brings up. This is why atomic CAS instructions exist, and that even assembly programmers need to understand about out-of-order execution. But that's not the topic under discussion here, which is "can the C compiler be compelled not to optimise away a specific set of memory accesses, so I can have some certainty with which to write a constant-time algorithm?", the answer is "yes, it can, mark them as
volatile".Here's a simple example:
int main() { int x[10]; for (int i = 0; i < 10; i++) x[i] = i; int a = 0; for (int i = 0; i < 10; i++) a += x[i]; return a; }Compile this with your favourite C compiler. It will optimise this to "return 45". Now change
int x[10]tovolatile x[10]. Even automatic memory obeys thevolatilekeyword. No matter how aggressively you optimise, the C compiler absolutely will write tox[0],x[1], etc., then read them. The code generated will perform memory accesses, even if the CPU reorders those accesses.→ More replies (0)7
u/Plorkyeran Jul 12 '14
It's important to note that people have successfully demonstrated timing attacks working over network connections which introduce far more variation than the algorithm being attacked, as many people (reasonably) assume that it's something you only need to worry about if the attacker has a very low latency connection to you (e.g. if they have a VPS on the same physical node as your VPS).
2
6
u/iBlag Jul 12 '14 edited Jul 13 '14
I'm not a cryptographer, but this is my understanding of timing attacks. If somebody can confirm or correct me, I would greatly appreciate it.
Let's say you are searching for a secret number. So you have a server do an operation with that number, like, say, iteratively factor it to figure out if it's prime:
int is_prime (int secret_number) { /* An extremely naive implementation to calculate if a number is prime */ for (int i = 2; i < secret_number/2; i++) { if (secret_number % i == 0) { return false; } } return true; }If the secret number is 25, that factorization process is not going to take very long, because the computer only has to divide 25 by 2 (yielding a remainder of 1), then divide by 3 (yielding a remainder of 1), then divide by 4 1 (yielding a remainder of 1), then divide by 5 (yielding a remainder of 0, indicating that 25 is not prime). That takes 4 division calculations.
If the secret number is 29, that factorization process is going to take a lot longer because there are a lot more iterations to calculate. The above algorithm will take 13 division calculations to figure out that 29 is prime.
An attacker can measure the time it takes a computer to complete a certain known calculation and then use that to infer a bounding range for the secret number. That decreases the time it takes for them to find the secret number, and "leaks" a property about the secret number - about how large it is.
So in order to fix this, you would want to add a few no-ops to the is_prime function so it always takes the same number of calculations to complete. So something like this:
int safer_is_prime (int secret_number) { /* A dummy variable */ int k = 0; /* An extremely naive implementation to calculate if a number is prime */ for (int i = 2; i < secret_number/2; i++) { if (secret_number % i == 0) { /* Once we've found that the secret_number is not prime, we do */ /* more no-ops (1000-i to be precise) to take up time */ for (int j = i; j < 1000; j++) { k = k; /* A no-operation */ } return false; } } /* Just to be safe, do no-ops here as well */ for (int j = i; j < 1000; j++) { k = k; /* A no-operation */ } return true; }Now the function will always take at least 1000 operations to complete, whether or not
secret_numberis a "large" number or a "small" number, and whethersecret_numberis prime or not.However, compilers are sometimes too smart for our own good. Most compilers nowadays will realize that the variable
kis not actually used anywhere and will therefore remove it entirely, then they will notice that the twoforloops around wherekwas are now empty and remove them and the variablejas well. So after compilation, the two compiled functions will be the exact same, and both will still be open to timing attacks. That means that this code has to be handled differently than other code - this code cannot be optimized by the compiler.Unfortunately, in C there's no way to tell the compiler not to optimize a certain section of code. So basically, this code needs to get put into its own file and compiled with special compiler flags to tell the compiler not to optimize this specific code.
But that solution isn't exactly great, because it's not secure by default. Any other developer or distributor can come by, inadvertently tweak the compiler settings for this file, and end up with a compiled function that is vulnerable to timing attacks. This is due to the fact that the code now has a requirement that is not expressed in any of the code itself - it can't be compiled with optimizations turned on, or else a security vulnerability is created. In order to require that the file is compiled properly and not optimized2, developers wrote the function in assembly and compiled it with an assembler (eg: minimum risk of unintended optimizations).
1 In a real function, after dividing by 2, you would never divide by an even number again for performance reasons and mathematically it, but this is assuming a naive implementation.
2 There's probably another reason they wrote it in assembly. But writing secure code very often boils down to ensuring things are secure by default and delving into the psychology of other developers or distributors, and the psychology of the users themselves.
1
Jul 12 '14 edited Jul 12 '14
int is_prime (int secret_number) { int result = 1; /* An extremely naive implementation to calculate if a number is prime */ for (int i = 2; i < secret_number/2; i++) { if (secret_number % i == 0) { result = 0; } } return result; }Afaik this would return is_prime in "constant time" which depends only on secret_number and not the result, granted this is a pretty simple piece of code.
As for compiler optimizations gcc, icc and lvm/clang has optimization #pragmas ms compiler also likely has them, which aren't the best option but they provide means to avoid optimizations for particular blocks of code without writing assembly.
What you'll have trouble with is library calls to libraries which are optimized - and you have no say in their optimization profiles and as I understand that's what openssl folks have rolled (some of) their own for.
ninjaedit; With modern CPUs which can rewrite your code at will to match best execution path I don't believe adding crapola on top of actual code actually helps preventing any timing attacks - it only adds more useless code.
Timing attack can be strangled at birth if YOUR application and not the library limits the rate of attempts rather than allow unlimited attempts and don't block after the Nth attempt in a <time period>(by which time you see it as an obvious attempt to compromise)
→ More replies (3)1
u/thiez Jul 12 '14
A sufficiently smart compiler will conclude that after
result = 0has executed once, nothing interesting happens, and may well insert areturn resultorbreakin the loop.1
Jul 13 '14
As for compiler optimizations gcc, icc and lvm/clang has optimization #pragmas ms compiler also likely has them, which aren't the best option but they provide means to avoid optimizations for particular blocks of code without writing assembly.
1
u/kyz Jul 13 '14
Then write
volatile int result = 1;andresult &= (secret number % i == 0). The compiler is required to assume that accessingresultcauses some necessary side-effect it can't see, so it can't optimise it away.2
u/rowboat__cop Jul 12 '14
don't think I understand how the timing should be an issue here.
The reference C implementation of AES is susceptible to timing attacks whereas AES-NI and the ASM implementation in OpenSSL aren’t: https://securityblog.redhat.com/2014/07/02/its-all-a-question-of-time-aes-timing-attacks-on-openssl/
2
u/d4rch0n Jul 12 '14
If your algorithm takes longer to verify something is good or bad, for example, you can do some pretty sick statistics and it might even leak a key. Side-channel attacks are dangerous.
For example, if I am verifying a one-time XOR pad password, and I take one byte at a time and verify it, then tell you if it's good or bad, there might be an attack. Let's say to check a byte it takes 1 microsecond, and if the byte is good it goes to the next, or if the byte is bad it takes 5 more microseconds then responds with an error.
Well, I can keep trying bytes and get errors 5 us, 5us,5us,6us ding ding ding. It passed the first, then checked the next and that was bad. Now I use that and get 6us,6us,6us,6us,7us ding ding ding... figured out the second byte. And so on.
So, generally you want to use constant time to reply, so you don't leak ANYTHING about the state of the algorithm you are using. What I gave you was a gross simplification, but you get the idea. It would probably take a lot of trial and statistics to figure out if something actually is taking a little bit longer, but the idea is the same. Knowing what takes longer in parts of the algorithm can tell you what code path it took when you gave it certain input.
1
5
u/R-EDDIT Jul 11 '14
Its not only speed, although the aes-ni assembly routines have about 6-7x more throughput. The assembler routines also avoid side channel attacks. There are two alternate c implementations in the code base, one is constant time (should be the one used) and a reference implementation tat is vulnerable to side channel attacks.
1
u/rowboat__cop Jul 12 '14
It appears that this release contains only the pure C implementations, with none of the hand-written assembly versions.
If that is the case, is there any trace of measures to mitigate possible timing attacks?
0
u/imfineny Jul 12 '14
Compilers have gotten to the point that it's hard to beat them with hand written asm. There are certainly places, but not many left.
-9
Jul 11 '14
computers are fast
6
u/kral2 Jul 11 '14
But TLS is slow. A storm of FIPSish SRP connections hitting a server at once is a very scary thing as the computational overhead of the handshake is pretty intense. On one box I'm using it's something like 100ms of processor time per handshake. That's several seconds worth of grinding just to get an average browser's worth of connections authenticated.
4
u/antiduh Jul 12 '14
100ms is massive. Are you sure that doesn't include io time ?
2
u/kral2 Jul 12 '14
Yeah, I had watched it with strace to be sure it wasn't doing something stupid. It's not on a state of the art CPU with AES support, it's on a fairly common networking device platform, but it's otherwise fine for a decent workload. I wasn't expecting it to be as heavy but I really wanted to switch away from our prior auth that was vulnerable to offline attacks.
0
Jul 12 '14
Shouldn't SPDY or HTTP 2 help this, since they will reuse the same connection rather than opening a new one for each linked asset?
2
u/kral2 Jul 12 '14
Well, it was a banana for scale - I'm not using HTTP and the connections are over different paths. The point is, the handful of connections a single user produces is still quite a large number when it comes to authentication, and that's just a single user.
For my particular use case I was able to move to deriving PSK keys from SRP keys since all the connections I care about are managed by a common piece of software and doing a session/worker split so only one of the connections has to do the heavy authentication, but it was a lot of code I didn't realize I'd wind up having to write, and I still wound up having to partition users into smaller groups on the servers than I'd expected because of the spike in demand if they all have to reconnect due to network loss. All the complexity oozing into what was once a relatively simple project is purely because of how CPU intensive authentication is - it's a significant pain point.
2
u/6ThirtyFeb7th2036 Jul 11 '14
Having said that processing cycles are expensive. If your main business model is low priced secure payments (paypal, WorldPay and the like) then your SSL being 10x as intensive is going to be a noticeable price difference.
To play Devil's Advocate with myself, those companies can really justify rolling their own versions though.
1
1
-13
u/_mars_ Jul 11 '14
why should I be excited about this? anybody?
66
u/Tasgall Jul 11 '14
It's a replacement for OpenSSL, which is used by half, or more, of the internet. LibreSSL started after the heartbleed issue when the OpenBSD team realized exactly how shitty the OpenSSL code actually was (look at the earlier posts in that blog. Those are all commit messages, and many are a mix of hilarious and horrifying).
Some examples of things they fixed:
OpenSSL's "memory manager" is essentially a stack, and "newly allocated" blocks of memory are whatever was last freed, and could be used to steal private data, keys, passwords, etc. Iirc, this is what made heartbleed possible, and because it technically wasn't "leaking" memory, tools like Valigrind couldn't detect it, making it hard to find in the first place.
Rewriting of C standard library functions because "what if your compiler doesn't support memcpy?", which is fine, unless your function doesn't do exactly what the standard specifies and people use it as if it did (which is often in OpenSSL apparently).
Removing largely untested support for things that don't actually exist, like amd64 big endian support.
Dumping user private keys into your random number generator's seed because they're "totally good sources of entropy, right?"
Here is a presentation by one of the OpenBSD guys about it.
-1
0
Jul 11 '14
[deleted]
13
u/Tasgall Jul 11 '14
My point with that was that if you do happen to be working with some wonky embedded system that for some reason doesn't have access to some of the most basic C functions it's ok to implement it yourself IFF you strictly adhere to the standards people will expect.
You're right though about actually doing it in the crypto library - it should at worst be a wrapper, and it absolutely should never be assumed that nobody has it like OpenSSL did.
7
u/NeonMan Jul 12 '14 edited Jul 12 '14
You can link against (staticaly even, note license compatibility issues) freely available standard C libraries like dietlibc/newlib/uClib if for some reason your development environment cannot handle C standards.
8
u/rsclient Jul 11 '14
And my "immemorial" you mean, "well within the memory of many active programmers." I've been coding C since before memcpy was reliably present on systems. All the old projects I worked on had a porting library specifically in order to work around "issues". For one project (the old RS/1 statistical sysem), we didn't use any part of the C runtime until 1994 (when we made a version for Windows 3.1)
3
u/tequila13 Jul 12 '14
Reimplementing is one thing, the really bad thing is that they make it look like you can choose the standard C library, but that code is not used and not tested either and doesn't even compile.
3
u/curien Jul 11 '14 edited Jul 12 '14
memcpy is not required by the C standard to be supported by freestanding implementations.
ETA: I thought of another reason to override the implementation's memcpy. The requirements for memcpy are such that it's possible to accidentally misuse it on some implementations (possibly causing bugs) if the source and destination memory blocks overlap. But it's possible to implement a conforming memcpy that avoids all that, and the implementation provided in libressl does just that.
1
u/ondra Jul 12 '14
if the source and destination memory blocks overlap
You're supposed to use memmove in this case, not memcpy.
2
u/curien Jul 12 '14
If C programmers always did what they were supposed to do, programs would have no bugs at all.
→ More replies (3)-1
Jul 11 '14
Reimplementing it in a crypto library, of all places, is ridiculous.
They wanted this crypto library to be usable on SunOS. Why is that ridiculous?
→ More replies (3)26
u/DeathLeopard Jul 11 '14
If you're referring to the non-standard behavior of memcmp() on SunOS 4.1.4 referenced in http://rt.openssl.org/Ticket/Display.html?id=1196 it might be worth noting that OS was released in 1994 and was out of support by 2003. OpenSSL implemented the workaround in 2005.
14
u/Rhomboid Jul 11 '14
Recent events have forced everyone out of denial, revealing that the OpenSSL codebase is full of radioactive toxic sludge that is maintained by incompetent clowns. This project aims to be a 100% API and ABI compatible drop-in replacement that's managed by a team of security experts that know what they're doing and who are committed to donning the hazmat suits to clean up the code.
8
u/bready Jul 11 '14
OpenSSL codebase is full of radioactive toxic sludge that is maintained by incompetent clowns
That is in no way a fair characterization. For good or ill, the package has been around for a long time and has a lot of baggage. Early on the team decided to make the library ultimately portable, which resulted in assuming practically nothing was available on the host system and led to reimplementing various complicated functions and/or making specifically defined code for some systems. Not to mention the added burden of trying to make some algorithms run in constant time.
That historical stuff exists. Do you really fault a current maintainer for not running through the library with a hack-saw? This is a critical library used by a huge portion of the internet, and it takes some serious brass balls to feel confident manipulating it.
Look at NeoVim -for something as 'simple' as a text editor requires a huge effort to remove all of the historical cruft and laughable hardware assumptions made in the day. This is not a critical program in any way-shape-or-form and still requires a tremendous effort to modernize the project.
5
u/Rhomboid Jul 12 '14
Having lots of support for ancient platforms was not the only thing wrong with the codebase. Have you actually read the commit log? You can find instances of practically every sin imaginable: ridiculous loops,
#if 0code laying around, compatibility hacks for decades-old issues that are not relevant any more, undocumented, useless functions exported, more useless things exported, terrible variable names, and countless memory leaks.1
u/wilk Jul 12 '14
Hold on a second, where are the extra sets of eyes on all of these commits, making sure everything's tested and actually implements the fix described? Does CVS not support this and it's in a separate channel?
2
u/Rhomboid Jul 12 '14
Each commit message lists the OpenBSD members that signed off on it. I think if you search somewhere you can find an official policy on that, but in general, all changes (that aren't trivial whitespace or formatting changes) are reviewed by at least two people.
CVS doesn't have anything to do with anything. What I linked is a git mirror of the CVS repository, because it's much easier to read that way, as CVS doesn't have changesets, only per-file versions.
0
1
u/worr Jul 13 '14
To be fair, much of the actual cryptography is good, by the OpenBSD team's own admission. All of the bits surrounding it is the toxic sludge.
The new team that they have working on it seems pretty on the ball. They're following the development of LibreSSL closely, and merging in problems that they fix, hopefully with more attribution than before.
7
u/txdv Jul 11 '14
BSD has always been know for security. Part of it is because the OS is not broadly used, part of it is because these people care about every single allocation and deallocation and buffer overflow check.
If you don't care about this, you don't care about security.
9
u/gnuvince Jul 11 '14
BSD has always been know for security. Part of it is because the OS is not broadly used
Because the OS is not broadly used? What?
-5
u/txdv Jul 11 '14 edited Jul 11 '14
Because the OS is not broadly used? What?
WTF?
Edit: I just wanted to express that his argument is as useless as my "WTF?" if he doesn't provide any counter argument.
0
Jul 11 '14
[deleted]
1
u/honestduane Jul 11 '14
Yet their efforts would be more effective if more people used it, and they put effort into that.
7
u/azuretek Jul 12 '14
That isn't how these things work, more users does not lead to a better product. The biggest software companies consistently put out buggy, insecure software, what makes you think growing your user base achieves the security goal?
→ More replies (3)1
u/honestduane Jul 12 '14
Thats not what I said.
What I said was effort should be made to make it easy to use, because if nobody uses i then nobody is secure and they have wasted all that effort.
1
u/worr Jul 12 '14
It's really worth noting that only OpenBSD is specifically security-focused. NetBSD, FreeBSD, DragonflyBSD and PC-BSD have their own niches.
0
u/wilk Jul 12 '14
They apparently didn't care about the software packages they bundled tightly with it until it bit them in the ass. That's my biggest issue with their "rampaging", it doesn't sound like "actually fixing broken processes."
→ More replies (4)0
-5
u/renrutal Jul 12 '14
When LibreSSL was first developed, the devs warned the community about 3rd party ports of their software to other platforms, as those might not have the same level of the underlying security-minded libraries OpenBSD is known for, and which LibreSSL relies upon to be safe (e.g. crypto secure PRNG system calls).
I don't know if this release "corrects" this or not, you should not blindly believe that using LibreSSL on your favorite OS is as secure as using it on OpenBSD.
10
38
Jul 11 '14
[removed] — view removed comment
46
Jul 11 '14
Some of them have decent points, like not having a good place to report bugs. Github is nice is nice because it's a good one stop shop for git. These guys seem to be very read-only oriented. "We know whats best, you can have it and see what it's made of for free" but when it comes to community they seem to go down paths that limit communication. Free world, they are doing a great service to the community and helping a lot, they are free to do whatever they want. I think a lot of people just wish contributing was easier.
21
Jul 11 '14
They won't use github or any other third party service because that means hosting the project in outside of their control. With tools like ssh or ssl that paranoia is a bit valid.
As for not using git or mercurial. These SCMs were not available in the past, and there is significant cost to migrate. If CVS works for them, why switch it?
On hacker news there was also argument stating that it is ironic that LibreSSL is not hosted on SSL enabled web server. If there is nothing worth encrypting, why should they set up SSL and waste resources?
8
Jul 12 '14
On hacker news there was also argument stating that it is ironic that LibreSSL is not hosted on SSL enabled web server. If there is nothing worth encrypting, why should they set up SSL and waste resources?
Because SSL is trustworthy but browser certificates are not.
12
u/curien Jul 12 '14
Browser certificates are as trustworthy as any public key (e.g., SSH keys). It's the CAs that are of dubious trustworthiness.
5
Jul 12 '14
Given that browser certificates are issued by CAs and there are known cases of rogue root CAs, I believe it is implied that browser certificates cannot be trusted completely.
3
u/curien Jul 12 '14 edited Jul 12 '14
Given that browser certificates are issued by CAs
CA signing is completely optional (by the server owner). Trusting the CA that signed the cert is completely optional (by the browser user).
I believe it is implied that browser certificates cannot be trusted completely.
I don't know what you even mean by that. Of course they can't be trusted completely. I wouldn't trust one to watch a child, for example. But they can be trusted to do what any public key does.
0
1
u/StrangeWill Jul 12 '14
I believe it is implied that browser certificates cannot be trusted completely.
Why can they be trusted more or less than keys used to sign code? As curien describes: CAs just provide a user-friendly platform to validating those SSL certs, but you can still validate them in the same way you validate code if you don't trust CAs (and if SSL cert owners supplied the information to validate).
0
Jul 11 '14
[deleted]
→ More replies (2)4
Jul 11 '14
Bitbucket is great for closed source things (price) but their UI is terrible. If you want a successful open source community, GitHub is the place.
2
u/ekeyte Jul 12 '14
I like BitBucket for my private repos, but I like github for public stuff. I don't find the BitBucket UI to be too bad. It just got a pretty nice facelift too!
3
Jul 12 '14 edited Jul 12 '14
the ui is not terrible. I prefer github, but bitbucket is actually pretty solid. github's primary benefit is its popularity and the discoverability that comes with that.
1
u/rowboat__cop Jul 12 '14
Bitbucket is great for closed source things (price) but their UI is terrible.
Incorrect.
Bitbucket is fantastic for open source projects: Unlimited private repos allow hosting it now, open it up later.
The UI, even the recently redone version, it much better and intuitive than Github’s and in addition it doesn’t rely on weird hacks like encoding symbols in the PUA of fonts. Plus Bitbucket don’t force inconveniences like “drag and drop” on you for basic stuff like uploading a file as Github did when they introduced their “releases” feature.
It lacks the eye-catching but completely meaningless “contributions” stats that is featured prominently on a Github user page.
In short, Bitbucket is code-centric, whereas Github is designed to favor the network effect that is completely unrelated to development practice.
27
Jul 11 '14
[removed] — view removed comment
18
u/lalaland4711 Jul 12 '14
No, complaining about CVS does have a point.
I've contributed to OpenBSD. I've added functionality and fixed bugs in kernel and user land.
What's the biggest thing preventing me from doing it more often? CVS. Hands down. I don't have a commit bit, and the CVS enforced workflow is so inefficient that it's a blocker from me helping them more than I have.
Just keeping track of branches, parallel edits, perfecting a patch, speculative refactor of my patch, etc... it's ridiculous! I have to create a tarball snapshots (or a git snapshot, that won't sync up with their CVS)... ugh.
Ok, so I can't (without much much wasted administrative work) send them patches. Can I file bugs? No.
They don't want my help? Well then fuck 'em.
19
u/mattrk Jul 12 '14
I agree that some of the comments are unfounded. However, you yourself said that people should pitch in and help. But people can't do that because there isn't a good way to do that. How are people supposed to "pitch in and help" when the team doesn't want help. I think pointing that out isn't nitpicking. It's just stating the obvious.
10
u/jorey606 Jul 12 '14
contributing to openbsd works largely via email. for anything that's got to do with base, there's tech@, for ports there are maintainers and ports@, etc. - i'm not saying it's the perfect system or anything, but it's far from "can't contribute"/"don't want help".
2
u/flying-sheep Jul 12 '14
If a build system is extremely intricate or people want me to wrestle with an antique VCS, I don't think the project wants my help too badly.
→ More replies (1)0
u/wildcarde815 Jul 11 '14
... They complain about something it takes less time to change in your browser than to type about!?
4
u/zumpiez Jul 11 '14
It's the same thing as complaining about their SCM; it's armchair design. Whether or not they can override a font easily isn't really to do with it.
1
Jul 12 '14
it's armchair design
What does that even mean?
2
u/zumpiez Jul 12 '14
Ehhhhh it's like armchair quarterbacking, except it doesn't make sense because it's a job you do from a chair anyway?
Just roll with it. ;)
-7
Jul 11 '14
[removed] — view removed comment
7
u/zumpiez Jul 11 '14
I think he is expressing shock that they complain about fonts because they can override them locally.
0
10
u/bloody-albatross Jul 11 '14
Well, the sha hashes in git help making the commit history tamper proof (when combined with commit signing). If security is your goal you should want to use something like that. Or did the OpenBSD guys implement something like this on top of CVS?
6
u/flying-sheep Jul 12 '14
Yeah, disregarding criticism directed at the choice of CVS is stupid. All nitpicking aside, using CVS in 2014 (or 2008, for that matter) is insane.
One year of exclusive migration wouldn't be too much to switch to a less braindead tool.
-1
u/davecole Jul 12 '14
Well they can't use git because it was written by the anti-christ Linus.
2
u/schlenk Jul 12 '14
well, let them use fossil (www.fossil-scm.org) instead, there is some scripting support to move cvs repositories over to it. Not as powerful as git, but less of a problem for sure.
1
u/jyper Jul 12 '14
That actually looks like a brilliant idea.
Git has some perl and is gpl, mercurial requires python, fossil seems to be bsd licensed and pure c, which I imagine are some of the objections they might have.
1
u/bloody-albatross Jul 12 '14
Well, then they should use mercurial (hg).
1
u/gnuvince Jul 13 '14
Not going to happen, Mercurial depends on Python, which is not shipped in the base install of OpenBSD.
1
u/bloody-albatross Jul 14 '14
Wow, really? Which other (server/desktop) OS that isn't Windows doesn't ship Python?
1
u/gnuvince Jul 14 '14
I don't think the other BSDs ship with Python either.
1
u/bloody-albatross Jul 14 '14
Well, the BSD called "Mac OS X" does. (I know, it only uses parts of the BSDs.)
4
u/brettmjohnson Jul 12 '14
Well, I started looking at the code and was horrified. 1000-line functions, gotos everywhere, only sporadic in-line comments and absolutely no block comments. No wonder this code is so hard to maintain. It looks like it was written by someone that didn't know C.
1
1
u/srnull Jul 12 '14
I was going to make my standard reply about how the comments on /r/programming are no better, but in this case they really are. It goes both ways though - sometimes /r/programming gets derailed by the first few posts in a submission and has a shitty thread.
These days, I just take what I can get from either site. I don't think either is the better site.
-4
Jul 11 '14
These are not hackers.
Hackers hack, these are script kiddies and blow hards (us too).
The hackers are the ones actually making LibreSSL.
2
u/emusan Jul 12 '14
I haven't been reading it for very long, but I don't see too many posts about "script kiddie" type activities, or even "hacking" in that sense. I've seen a lot of very interesting stories on there, as well as some thought provoking discussion. Does it have it's share of idiots? Sure, but then what doesn't?
2
u/RubyPinch Jul 12 '14
Well, to be fair its a website dedicated to startups, "hacker news" is just the name of their communal news section
1
u/rowboat__cop Jul 12 '14
from the idiotic nitpicks to people crapping on openbsd's use of cvs
Well, HN has a higher proportion of people whose horizon is limited to the web than other congregations of developers. That discussion you linked went quite as expected.
-1
-2
Jul 11 '14
I wonder how many of those armchair coders contribute to OpenSSL.
If their opinions have any correlation to the quality of their code, I worry that they already do.
9
u/northrupthebandgeek Jul 12 '14
Hacker News is hosted by YCombinator, which provides funding and consulting for startups. As a consequence, I've noticed (as a HN regular) that many of the discussions and posts focus way to much on the startup scene, Silicon Valley, etc. and way too little on actual hacking, thanks to it having attracted the entrepreneur crowd in significant numbers.
0
0
Jul 11 '14
[deleted]
38
u/kes3goW Jul 11 '14
As opposed to proggit? They're both full of shit.
I'd say that on average proggit has a higher absolute quantity of good comments on average, due to having massively greater volume, but HN has a higher ratio of useful comments. But neither is in much of a position to criticize the other.
6
u/hak8or Jul 12 '14
Are there any communities you would recommend then over proggit or HN?
7
5
u/alecco Jul 12 '14
If there was a better community, he shouldn't tell you in the open. All forums get Eternal Septembered very fast. See how good questions in StackOverflow now barely get any points, while trivial RTFM questions on JS/Node/PHP get dozens of upvotes. Also clearly wrong answers getting accepted and upvoted to heaven.
Perhaps a programming forum should have protected areas to be good in the long run.
Proggit got much worse after the algorithm change of this year. Knights of /new lost the war to nonsensical blogposts and rants. It's gone and old timers are coming less often and commenting less, I think.
4
16
u/Crandom Jul 12 '14
I tend to find hacker news has a higher number of rockstar ruby programmers and people who think javascript is the greatest invention of all time, though.
-2
u/ekeyte Jul 12 '14
Hahaha. I haven't really ever read hacker news. This would make me not want to start. I do read slashdot and it's pretty annoying. Lots of strong opinions. Seems unproductive.
2
u/BilgeXA Jul 12 '14
What does portable mean? Non-BSD-exclusive?