Live data from Hacker News

Pretty Curved Privacy

github.com

31–40 of 47 posts

Re: Pretty Curved Privacy

#32
> Please note the big difference to GPG though: both Alicia AND Bobby have to enter the passphrase for their secret key! That's the way CURVE25519 works: you encrypt a message using your secret key and the recipients public key and the recipient does the opposite, he uses his secret key and your public key to actually decrypt the message.

Forgive my ignorance, but I assume that this is to ensure that the message is from Alicia. How is this different from signing + encrypting a message in PGP?

Re: Pretty Curved Privacy

#34
post #27
post #25

Earlier quoted context omitted.

While NaCl/Sodium does simplify the crypto aspect in particular, it's dangerous to assume that it entirely solves the broader problem of writing secure code. Implementing anything securely is hard enough before involving crypto that the level of expertise required doesn't change all that much. (Most catastrophic vulnerabilities in security software aren't directly in the cryptographic implementations.) Even using NaC…

Agreed. Now kindly point to the mistakes the author has made so others can learn from them.

Am I allowed to be concerned that this is C code that opens up random files to be decrypted, slurps a 32 bit integer directly out of the file, passes that value to malloc, and then just a few lines later loops memcpy'ing into that buffer?

https://github.com/TLINDEN/pcp/blob/master/libpcp/crypto.c#L...

That's, like, 5 minutes worth of looking, most of it spent working out how to get from main() to the part of the code that actually starts taking attacker-controlled inputs; we're about 10 lines into the code that handles those inputs. Is that a real vulnerability? Hell if I know, but I'm scared of this code.

Which is not to say I don't like it. There's a small utility function in there I'm stealing! The author is clearly smart and I hope this was an interesting project for them. But I don't recommend using this for real --- and I think neither does the author.

Re: Pretty Curved Privacy

#35
post #28

Earlier quoted context omitted.

I wasn't actually commenting on this project in particular or whether or not the author happens to be an expert (tptacek may have more to say about that), just on the idea of NaCl as a replacement for expertise.

NaCl/libsodium solve a low-level problem that even very few talented engineers with years of software security experience can be expected to get right on their own. Using these features should still be done under the guidance of someone who knows what they're doing. There's a larger number of developers who can use libsodium than there are developers who could replace it on their own. In a sense, NaCl/libsodium can b…

Great explanation. That's exactly what it achieves.

Re: Pretty Curved Privacy

#36
post #29
post #27

Earlier quoted context omitted.

Agreed. Now kindly point to the mistakes the author has made so others can learn from them.

"If you can't immediately point out the flaws in this software, it must not have any."

That's a nice way to put the fallacy. That one is so common it needs its own name and Wikipedia page with list of hacked products that used the fallacy. Anyone already do that with a link?

On my end, I always tell them any system or scheme is to be assumed vulnerable until proven otherwise through analysis and pentesting. If they doubt that, I show them plenty of stuff made by pro's and associated CVE's. Then ask if their people were better and with more budget for security. Usually a no...

Re: Pretty Curved Privacy

#37
post #29

Earlier quoted context omitted.

"If you can't immediately point out the flaws in this software, it must not have any."

That's a nice way to put the fallacy. That one is so common it needs its own name and Wikipedia page with list of hacked products that used the fallacy. Anyone already do that with a link? On my end, I always tell them any system or scheme is to be assumed vulnerable until proven otherwise through analysis and pentesting. If they doubt that, I show them plenty of stuff made by pro's and associated CVE's. Then ask if…

I've written my fair share of vulnerable code throughout the years. Two key indicators for me: Do they learn from their mistakes? Are they proactive at preventing mistakes?

Re: Pretty Curved Privacy

#38
post #13

This package, by Watson Ladd, is the same idea implemented by an expert: https://github.com/wbl/cpgb

I'm not sure what you are trying to say.

Are you saying that people should use CPGB? Are you saying that CPGB is better than pcp because you think the author of CPGB is more of an expert than the author of pcp?

Did you notice the pcp author actually tried to write tests, whereas there are no tests in CPGB?

BTW, the last commit to CPGB was on Dec 19, 2011.

I've nothing against CPGB and I'm not familiar with pcp but I think this "expert" thing is ridiculous.

Re: Pretty Curved Privacy

#39
post #13

This package, by Watson Ladd, is the same idea implemented by an expert: https://github.com/wbl/cpgb

I'm not sure what you are trying to say. Are you saying that people should use CPGB? Are you saying that CPGB is better than pcp because you think the author of CPGB is more of an expert than the author of pcp? Did you notice the pcp author actually tried to write tests, whereas there are no tests in CPGB? BTW, the last commit to CPGB was on Dec 19, 2011 . I've nothing against CPGB and I'm not familiar with pcp but I…

I'm sorry, I don't follow your objection. What's ridiculous here? My trust for Watson Ladd's crypto code is epsilon less than my trust for Bernstein's code. The expertise I'm appealing to here is pretty straightforward.

Re: Pretty Curved Privacy

#40
post #39

Earlier quoted context omitted.

I'm not sure what you are trying to say. Are you saying that people should use CPGB? Are you saying that CPGB is better than pcp because you think the author of CPGB is more of an expert than the author of pcp? Did you notice the pcp author actually tried to write tests, whereas there are no tests in CPGB? BTW, the last commit to CPGB was on Dec 19, 2011 . I've nothing against CPGB and I'm not familiar with pcp but I…

I'm sorry, I don't follow your objection. What's ridiculous here? My trust for Watson Ladd's crypto code is epsilon less than my trust for Bernstein's code. The expertise I'm appealing to here is pretty straightforward.

The appeal to expertise is exactly what I'm objecting to. Let's judge things on their technical merits: tests, clarity of code, correctness, etc.

I've talked to way too many people that want to make contributions to improve security software, including crypto software, but get scared away because of the implied and explicit discouragement due to such appeals. It's holding our industry back and slowing us down.

Post reply on HN