Better HN
topnewbestaskshowjobs
Log inSign up

CiPHPerCoder

6,663 karma · joined Feb 25, 2016 (10y ago) · 1,775 submissions

My name is Scott. I do a lot of open source security research, and cryptography.

Previously AWS Cryptography (2019 - 2023).

Unless otherwise stated, my opinions are my own and do not reflect my employer.

https://scottarc.blog/about/

Submissions

comment 10y ago · link · parent

Yes and no. I made a choice years ago and I'm still enduring the consequences of it, with no recourse until I cross the finish line.

comment 10y ago · link · parent

> CiPHPerCoder listed four things he enjoys doing over his weekends. I would love to have a conversation about those things with him because it also adds to the variety of conversations I get to have.

Sorry, would have responded sooner but HN's rate-limits kicked in.

> If you don't like watching movies or playing video games, then it's very difficult to have a fun conversation about those things.

I do enjoy those activities, but I accepted a lot of responsibility (especially with making secure PHP code-- a feat some infosec folks claim is inherently impossible) and intend to finish what I started. That means missing out on a lot of great movies (Warcraft, Zootopia) and video games (OverWatch) that my friends are all able to enjoy.

Ultimately, I believe the work I'm doing today will make a difference tomorrow. Whether I'll be able to capture any of that value for myself remains to be seen.

comment 10y ago · link · parent

Let me clarify a bit then: My criticisms of RSA stem from studying how people implement it in cryptography libraries.

More people implement PKCS1v1.5 padding than implement RSAES-OAEP in their application-layer crypto, and that's a problem.

Conversely, most of the applications I've analyzed that wanted ECDSA/ECDH used OpenSSL or libsodium.

Guess which ones were broken with chosen-ciphertext attacks.

If you want a theoretical concern: Index calculus attacks.

If you want a practical concern: Look at the traps that cause implementations to be comically insecure.

comment 10y ago · link · parent

Quite right. In a one-on-one conversation, I know how to conduct myself to make it less awkward for the other person, but I still feel like I'm lying by omission when I answer questions like that.

comment 10y ago · link · parent

Here's a high-level library: https://github.com/paragonie/halite

It uses libsodium, which only offers X25519/Ed25519 for public key crypto.

comment 10y ago · link · parent

> As RSA and finite-field DH aren't broken

No, but their implementations often are. For a recent example (Zend Framework, just at the end of 2015): http://framework.zend.com/security/advisory/ZF2015-10

More famously: http://www.cryptofails.com/post/70059600123/saltstack-rsa-e-...

RSA has more knobs to turn than EdDSA, and leads greater room for implementor error.

comment 10y ago · link · parent

I wouldn't know. As I said, I don't have the free time for those. :P

comment 10y ago · link · parent

> The point is to bring up something that can get you excited and animated.

Well, the only time you'll get that out of me is when I'm angry.

Most of my weekends involve:

* Reading research papers

* Reviewing other peoples' source code

* Reporting security vulnerabilities to open source projects (usually with a patch)

* Improving these projects: https://github.com/paragonie

I never have any time to watch movies, play video games, or engage in creative hobbies.

comment 10y ago · link · parent

People ask me that all the time and it's awkward. I very rarely do anything anyone else would consider "fun", even on weekends.

Most of what I do can be classified as "work".

comment 10y ago · link · parent

You probably shouldn't even entertain the notion of RSA or finite field Diffie Hellman anymore. In general...

Public key encryption: Use X25519 (RFC 7748) then 256-bit symmetric-key encryption in an AEAD mode. (When in doubt, ChaCha20-Poly1305 is a great choice with ephemeral keys.)

Public key signatures: Use Ed25519 (RFC 7748) or deterministic ECDSA (RFC 6979) over a 256-bit curve.

And obviously, the key sizes on that page have no applicability to post-quantum cryptography key sizes.

comment 10y ago · link · parent

If you're going to do this, go the VPN route.

comment 10y ago · link · parent

Get a couple double cheeseburgers with no bun (meat and cheese only). An extremely affordable way to get a quick bite to eat while on a ketogenic diet.

comment 10y ago · link · parent

I suspect they're being downvoted for comparing LGBT folks to "weirdos or spiky-haired freaks" moreso than having a contrary choice in fast food restaurant.

comment 10y ago · link · parent

I can't upvote this comment enough. That's an excellent answer to the question.

comment 10y ago · link · parent

I personally avoid Chic-Fil-A because of their anti-LGBT and pro-religion values, but I'm glad to hear they're pleasant for children.

comment 10y ago · link · parent

I wish NCC Group had been given more time, since phpMyAdmin is nigh-ubiquitous in legacy PHP apps.

For example:

https://github.com/phpmyadmin/phpmyadmin/blob/4cd8ab8a957a23...

Despite setting several security-related session configuration values, they don't touch the cookie entropy fields, which means a potential session fixation vulnerability.

This might not be a concern for most users: typically your distro ships a php.ini configured to read at least 16 bytes from /dev/urandom. But not always! Many projects set cookie.entropy_length and cookie.entropy_source just to be sure.

comment 10y ago · link · parent

If you throw in "No Flash, Java, or JavaScript" that sounds like a killer idea for a YC submission.

comment 10y ago · link · parent

> no need to be a crypto expert to sign cookies

You literally just said the equivalent of "no need to be a crypto expert to implement cryptographic signatures."

Please don't do that without a crypto expert on staff. They'll be able to avoid side channels that non-experts will never even imagine. To wit: http://blog.ircmaxell.com/2014/11/its-all-about-time.html

It's just a bad idea all around.

comment 10y ago · link · parent

Use sessions for client->server and OAuth2 for server->server.

comment 10y ago · link · parent

> How do people deal with those aspects in practice?

In one word: Poorly.

There is no elegant solution outside what you've outlined here. Or: they use stateful JWTs.

comment 10y ago · link · parent

JWT is often used as an implementation of signed cookies.

Also, don't use signed cookies unless you have a crypto expert on staff.

comment 10y ago · link · parent

That's it in a nutshell. A lot of developers also misuse JWT in strange ways, and the meat of this article was responding to those weird/unsafe use-cases.

comment 10y ago · link · parent

> Another problem with ZCash is the fact that it’s brand new cryptography.

It's using libsodium. This is an alarmist and false statement.

> Nobody can really guarantee that there aren’t some bugs in the system that will make it possible to deanonymize transactions or create coins out of thin air.

Sure, that's technically true of all crypto-currencies.

comment 10y ago · link · parent

I have an anecdote to support your comment: One of the more valuable tools I've worked on was random_compat. Over 6 million Packagist downloads and has been integrated in all the major frameworks that still support PHP 5.

https://github.com/paragonie/random_compat

https://packagist.org/packages/paragonie/random_compat

Despite being incredibly useful tool, there isn't a lot of active development going on. It just works, and when it doesn't, it's because your operating environment is borked.

Paying per commit wouldn't make sense for us. We have very little technical debt.

comment 10y ago · link · parent

I'm looking forward to SMIMP.

https://github.com/smimp

comment 10y ago · link · parent

None. VPNs can't provide any meaningful privacy: https://gist.github.com/joepie91/5a9909939e6ce7d09e29

Okay, that's not entirely true; I do access a company VPN, but not for privacy purposes which is probably what's implied. I use Tor for that.

comment 10y ago · link · parent

SSH key with public key auth over VPN.

comment 10y ago · link · parent

The subtext here is unsettling; I really hope I'm misreading it:

Security issues fixed and announced a month ago are only just now available for TAILS users. https://tails.boum.org/security/Numerous_security_holes_in_2...

TAILS still doesn't ship with a grsecurity-hardened kernel.

These might not be big deals if TAILS wasn't designed specifically for high risk users. Maybe they need more funding and open source love?

comment 10y ago · link · parent

It's the ROT13 of defense mechanisms.

comment 10y ago · link · parent

What you're thinking of is called a "pepper" and is discouraged.
1
505152
60