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 9y ago · link · parent

There's even more work to be done on the WordPress front (and PHP in general for that matter): making automatic updates secure even if the server gets hacked.

https://core.trac.wordpress.org/ticket/39309

https://github.com/paragonie/sodium_compat

I'm currently writing a pure-PHP libsodium polyfill that, once audited, will be proposed to shore up the security of PHP projects the whole world over. Among other things, this means that everyone will be able to adopt Argon2i for password hashing even if they support PHP 5.2.4 like WordPress does.

Ideally, everyone would get in the habit of updating to the latest versions more rapidly. But when 27% of the Internet runs software that refuses to modernize, that becomes a huge risk to the rest of the Internet.

comment 9y ago · link · parent

The advice on this page is accurate and in line with what cryptography experts will recommend.

That said, if you're looking for more of the how and less of the why: https://paragonie.com/blog/2016/05/how-generate-secure-rando...

Contains snippets and recommendations for C/C++, Erlang, Go, Java, (Browser) JavaScript, .NET, Node.js, PHP, Python, Ruby, and Rust.

comment 9y ago · link · parent

> Have a look at the bugs for Node, Ruby and Wordpress.

Worth noting: WordPress has been using the OS's CSPRNG since 4.4.

https://paragonie.com/blog/2015/10/coming-wordpress-4-4-cspr...

comment 9y ago · link · parent

If you have a designer who's worked with templating engines in other languages (e.g. Django/Python projects), they already know what they're doing.

It also makes it easier to separate your presentation logic from your business logic.

For example: https://github.com/paragonie/airship/blob/master/src/Cabin/B...

This uses macros and other fun things. Doing that in PHP would get messy.

https://github.com/paragonie/airship/blob/master/src/Cabin/B...

comment 9y ago · link · parent

Don't just do it for them, do it for yourself too. :)

comment 9y ago · link · parent

Far too many to list here. A small sample:

- https://github.com/mholt/caddy

Caddy is an HTTP/2 webserver written in Go that integrates with ACME and serves websites of TLS by default. It powers https://paragonie.com and manages our HTTPS certificates automatically.

- https://github.com/twigphp/Twig

Twig is one of the sane templating languages for PHP projects that I use extensively.

- https://github.com/composer/composer

Composer revolutionized PHP development.

A lot of the "PHP sucks" arguments focus on things that haven't been true about the language since 5.4 (or earlier), but one thing that truly did suck was dependency management (before composer came around).

Dependency management also sucks in other languages (and still sucks in those). I suspect that's why few used that as a criticism of PHP.

- https://github.com/jedisct1/libsodium

Libsodium: modern cryptography that you can likely find bindings for in your favorite programming language.

comment 9y ago · link · parent

> Aaron was a good kid.

I'm inclined to agree with everything up to and including this.

> They all start out as good kids.

...but I would disagree with this point in particular. Not all.

comment 9y ago · link · parent

Everything I've done this year pales in comparison to what I did last year: https://paragonie.com/blog/2015/12/year-2015-in-review

I'm looking to improve the security of potentially ~82% of websites in early 2017.

comment 9y ago · link · parent

Ah right, I forgot about the others. :(

Yeah, it's a real problem that needs to be addressed when discussing empathy.

comment 9y ago · link · parent

> Can we increase people's empathy?

Psychopaths exist. What do we do about them?

comment 9y ago · link · parent

Nature conservation, climate change response, sustainable agriculture, endangered animals.

That's all under the same theme I was talking about in my comment. It's half of your list.

comment 9y ago · link · parent

Or something like this: http://externals.io/thread/442#email-12842

comment 9y ago · link · parent

> How would you propose making a list of "99 reasons 2016 was a good year" without "sampling bias"?

If I were to write this article, I'd attempt to hit as many different interests as possible, including things I find silly or inconsequential (i.e. sports teams' accomplishments).

> A conservative's list would be very different: opened up vast new areas to oil drilling! Outlawed abortion in more countries! Rolled back environmental regulations that protect penguins over jobs! Reduced crime with stiffer prison sentences!

That's an interesting take on conservatism. Most of the self-proclaimed conservatives I know wouldn't agree with that, but maybe they're mislabeling themselves?

comment 9y ago · link · parent

> You can stand on your own merits without trashing everybody you don't know.

I think I see the problem here.

You're parsing my statements as a sort of attack on others.

Let's try this: The global population of full-time PHP developers who are qualified to perform brain surgery is probably less than 10.

Is that statement less controversial?

Understanding cryptography isn't exactly a requirement for being a successful PHP developer. Additionally, the folks who do know cryptography very rarely find themselves working on PHP full-time: There's too much industry demand in other areas.

That most developers who work on PHP full-time do not have this particular skillset is NOT an attack on most developers. It's simply an observation and a reasonable consequence of the absence of market pressures.

Also, it's a difficult subject.

comment 9y ago · link · parent

OK, I thought the "use the original headline" rule was stricter but just reread the guidelines and saw that I was wrong.

comment 9y ago · link · parent

> If they update the library to match the newer expert opinion, it breaks existing code. If they do not update the library, then new applications using it will get the bad default value.

This is true for lower-level cryptography libraries like OpenSSL or Libsodium. This isn't true, however, for the sort of higher-level libraries I recommend developers use.

See https://github.com/defuse/php-encryption which implements version tagging in its ciphertext output.

If Taylor Hornby has to publish a version 3 that uses, say, NORX instead of AES-256-CTR+HMAC-SHA256, the first 4 bytes will identify the version of the library that was used to encrypt the original message. Backwards compatibility is transparent to the end user. (Headers are covered by the HMAC.)

comment 9y ago · link · parent

> Do all 10 work at your company, or are the remaining 9 employed elsewhere?

I'm only aware of one other person who fits the criteria I've stated (many others would if I loosened the "work with PHP full time" restriction).

> You get called out for using clickbait headlines, and then double down by stating an absurd and baseless opinion.

Absurd and baseless?

There are probably very few security researchers that have looked at more application-layer cryptography features than I have, especially those written in PHP. If you know of any: Ask them if they believe my assessment of the PHP community is wrong.

https://paragonie.com/security/advisories

https://github.com/issues?utf8=%E2%9C%93&q=author%3Aparagoni...

You're free to dislike the headline. I've got nothing to say in defense of it.

comment 9y ago · link · parent

https://news.ycombinator.com/newsfaq.html - See: "Are reposts ok?"

Also, your claim that I only post from one domain is demonstrably false: https://news.ycombinator.com/submitted?id=CiPHPerCoder

Happy to discuss better strategies for raising security awareness among PHP developers if sharing content on HN is viewed as annoying.

comment 9y ago · link · parent

It floated near the top of page two for a while then died off. I don't know that it ever landed on the front page for any appreciable length of time.

comment 9y ago · link · parent

I know nothing about individual readers' knowledge. However, when addressing the general audience (programmers and in particular PHP developers), I've seen enough projects (both open source and proprietary) that attempted to provide public key encryption to have an idea of the average developer's competence here.

For example, this library for integrating with a payment gateway: https://github.com/pagarme/pagarme-php/issues/29

There are people who can do public key encryption in PHP safely†, but when left to their own devices most people will not. Thus, the headline.

† I would go as far as to claim the global population of full-time PHP developers who can securely implement public key encryption in PHP without outsourcing to libsodium is less than 10.

comment 9y ago · link · parent

> Did you read it from start to end?

Yes, I did.

> The conservation of our planet is probably the biggest challenge facing humanity, and everything else sort of ties in with it.

Okay, you just conceded a point that negates any reasonable premise for your question that I can imagine at this time.

If everything is sort of tied in with environmental concerns, then why did you think I didn't read the article from start to end? If you didn't think that, then why did you feel the need to ask if I had?

I may be missing something obvious. I'd appreciate if someone could fill me in on what I missed.

1192.

Public-Key Encryption in PHP(paragonie.com ↗)

22 points · by CiPHPerCoder · 9y ago · 27 comments

1193.

Ask HN: What if we legalize cybercrime?(bqp.io ↗)

72 points · by CiPHPerCoder · 9y ago · 57 comments

comment 9y ago · link · parent

So much of this list was about conservation and environmental issues that it was almost frustrating to filter it out.

I have nothing against these topics, but when you dominate your list with one theme and don't address that theme in the lede, I reflexively assume the author is attempting to pull the wool over my eyes. There is almost certainly some sampling bias going on, at least.

comment 9y ago · link · parent

Reproducible builds are one of three components necessary to have a secure code delivery system: https://defuse.ca/triangle-of-secure-code-delivery.htm

That Red Hat and Ubuntu aren't interested in delivering trustworthy software means you shouldn't trust them.

1196.

Tech Employee's Pledge not to participate in racial or religious profiling(neveragain.tech ↗)

3 points · by CiPHPerCoder · 9y ago · discuss

comment 9y ago · link · parent

It's non sequitur.

"I have a phone number but don't want to give it out" is different than "I don't have a phone".

But hey, there are 2FA devices you can use instead.

1198.

Securing Your Business's Online Presence – A Guide for Non-Experts(paragonie.com ↗)

3 points · by CiPHPerCoder · 9y ago · discuss

comment 9y ago · link · parent

If anyone else has screwed up and used MD5 for passwords and doesn't know a good way to migrate towards something secure: https://paragonie.com/blog/2016/02/how-safely-store-password...

1200.

Application Security and Software Development: Quick Answers(paragonie.com ↗)

1 points · by CiPHPerCoder · 9y ago · discuss

1
394041
60