News for hackers. Stuff that matters.
Re:The spiped secure pipe daemon by sneak on Monday July 04, 2011 @05:17PM (#2727910)
I spent about five minutes poking through it and nothing stuck out... but when I stopped I contemplated how many eyeballs have done the same thing to stunnel/gnutls already.

I didn't reach any conclusion from my quick look, but was definitely put off by the "it's big so it must be insecure" view taken by the author.

Re:The spiped secure pipe daemon by cperciva on Monday July 04, 2011 @05:28PM (#2727939)
I'm not saying that stunnel is insecure. I'm saying that I don't trust it to be secure.
Re:The spiped secure pipe daemon by sneak on Monday July 04, 2011 @05:55PM (#2728003)
What OS kernel do you run? Also, what's the next question I'm about to ask you after you answer that?
Re:The spiped secure pipe daemon by tptacek on Monday July 04, 2011 @06:08PM (#2728036)
He's the FreeBSD security officer. What were you thinking was going to stick out when you read through it? What mistakes did you look for?
Re:The spiped secure pipe daemon by sneak on Tuesday July 05, 2011 @10:24AM (#2729916)
Didn't know that, I'd never heard of him before (I haven't run BSD in years, and when I did it wasn't FreeBSD).

Most of the time when someone posts a "look what I just implemented in C" to HN it's, well, not great. As I mentioned I only looked for five minutes, but I looked for really basic general programming errors, low-hanging fruit kind of stuff. That's enough to effectively cull a lot of the noise that gets posted here.

His code is good - I just wonder why someone'd go to the effort (which is much higher than most other programming projects, due to the consequences of a bug) when we already have well-worn codebases for stuff /almost/ exactly like this, considering the tightrope-of-vigilance that is correctly implementing crypto protocols.

I understand now that he wants a PSK vs. stunnel/TLS's certs-on-both-ends method, but effectively it only really differs in connection setup, as TLS (the way I understand it to be generally used) does symmetric crypto for the payload data anyway (after key setup).

PS: His project is the first time I've encountered the use of gotos resulting in _cleaner_ code than without them. :)

Re:The spiped secure pipe daemon by cperciva on Tuesday July 05, 2011 @11:36AM (#2730225)
I just wonder why someone'd go to the effort

It wasn't that much effort. Almost everything under /lib/ I had already written as part of tarsnap or kivaloo; I spent maybe 10 hours making minor tweaks and cleanups to that code (which will be useful when I next use the library code anyway) and somewhere around 40 hours figuring out the protocol and writing the spiped specific code.

Having a simple secure pipe tool will save me far more time than that, once you count things like wanting to programmatically set up encrypted pipes (for which spiped's command line and arbitrary key is much better than stunnel's configuration file and SSL certificates).

effectively it only really differs in connection setup

And connection setup is a big deal. That's where almost all the vulnerabilities happen. In SSL, you go through a complicated handshake before you can decide that the client you're talking to doesn't have the right keys; in spiped, you exchange 256-bit nonces, and then if the very next buffer you read doesn't have right right HMAC, the connection is dropped. Evil data never meets asymmetric crypto. If an attacker doesn't have the key, they can't force you to burn any significant amount of CPU time.

Re:The spiped secure pipe daemon by spicyj on Monday July 04, 2011 @06:11PM (#2728042)
What is your next question?
Re:The spiped secure pipe daemon by sneak on Tuesday July 05, 2011 @10:09AM (#2729857)
His kernel has many lines of source, too. How does he trust that to be secure? (As it turns out, he's the FreeBSD security guy, so that one probably would have backfired.)

Still, big != unsafe.