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

The last thing the Internet needs more of is foot-bullety ECDSA deployed at scale.

Point of order: Does ES256 enforce RFC 6979? If not, how do you know you aren't repeating k-values?

The only sane crypto in the JWT specification is, sadly, HMAC.

comment 9y ago · link · parent

The issue is that the client software being open source (rather than closed source) would do nothing to change the risk profile, so it's not worth bringing up.

If the client is open source: What the server is doing is irrelevant as long as the client is secure.

If the client is closed source: What the server is doing is irrelevant as long as the client is secure.

If the server can compromise the client, whether or not the client is open source does not matter.

People who believe that open source is a prerequisite for security are disregarding the entire discipline of reverse engineering which is a large chunk of software security expertise.

comment 9y ago · link · parent

> It still feels weird to have security experts characterize WhatsApp's choice as acceptable;

They're not acceptable in general.

They're acceptable within the context of the problem they are trying to solve, which isn't "make crypto nerds happy". Their users, by and large, know absolutely nothing about cryptography. Any attempt to add key verification will either:

  - Spook them
  - Intimidate them
  - Confuse them
  - Make them move to an insecure platform that their contacts
    already use; i.e. SMS
  - All of the above

comment 9y ago · link · parent

The point of WhatsApp isn't E2E Encryption. The point of WhatsApp is reliability. The E2EE was an extra.

If it even works to enhance the privacy of 0.1% of users, it's helped a million people in ways that SMS has not.

comment 9y ago · link · parent

You don't need to know what the server does with your data if the client is encrypting it properly.

The client-server architecture is irrelevant here.

Read this, then flip the roles: https://paragonie.com/blog/2016/03/client-authenticity-is-no...

Reverse engineer the client-side app. You now know what the client-side app (the part that people want to be open source) is doing. You don't need to know what the server's code is doing.

comment 9y ago · link · parent

> I'll point out none of the security researchers in the article dispute the vulnerability is as described.

Just so you know, tptacek signed this letter. I did as well.

Calling it a backdoor was outright dishonest. I've written backdoors. I even won a cryptography backdoor contest at DEFCON with one of my designs.

https://underhandedcrypto.com/2015/08/08/crypto-privacy-vill...

https://paragonie.com/blog/2016/01/on-design-and-implementat...

If it's to be said that there is a vulnerability, then it is simply, "If there are any messages that haven't been delivered yet, and the recipient changes keys, the client will re-encrypt to the new public key before alerting."

Okay, a lot of security experts wouldn't make that trade-off, especially if they were trying to compete with Signal. But WhatsApp isn't a Signal competitor. The alternative means of contacting someone you'd normally use WhatsApp for is SMS, because that's what people are using today.

Most WhatsApp users aren't interested in encryption. It just works for them. They may still need it, but they don't care about it.

Even if you could exploit this, you get:

  - Any undelivered messages (if any)
  - No past messages
  - No stealth either; the user does get alerted
So, yes, we do dispute the vulnerability is as described, especially when it was called a backdoor.

comment 9y ago · link · parent

> How many authorities would it take you to convince you that up is down and white is black?

One linguist armed with a very strong argument rooted in verifiable facts.

comment 9y ago · link · parent

http://binary-auditing.com

Binaries aren't magic.

comment 9y ago · link · parent

> WhatsApp has something like a billion users. Virtually none of them asked for end-to-end encryption. They don't know that they want it, but they got it anyways when Whisper worked with WhatsApp to add Signal Protocol to WhatsApp.

> But just because they don't want it doesn't mean they don't need it. Many WhatsApp users badly need messaging security that works better than their alternatives. They don't know it, but with the flip of a switch, they got that security.

Most of them probably don't know they have it, either. This is a good thing: People can be safe without knowing how safe they are. The industry should be moving more people towards secure defaults.

Yes, security nerds will want something harder to attack in the middle. That's fine: They can build their own perfect security tools, and nobody will use them.

1150.

Configuration-Driven PHP Security Advice Considered Harmful(paragonie.com ↗)

1 points · by CiPHPerCoder · 9y ago · discuss

comment 9y ago · link · parent

As a contingency plan in case this article gets the HN hug of death: http://archive.is/ACTOT

1152.

A Plea for Responsible and Contextualized Reporting on User Security(technosociology.org ↗)

62 points · by CiPHPerCoder · 9y ago · 6 comments

1153.

When Constant-Time Source Code May Not Save You – Kudelski Security(research.kudelskisecurity.com ↗)

3 points · by CiPHPerCoder · 9y ago · discuss

comment 9y ago · link · parent

I forgot to include a link to said research!

https://research.kudelskisecurity.com/2017/01/16/when-consta...

comment 9y ago · link · parent

I'm aware of the recent curve25519-donna on 32-bit MSVC research, but PHP uses a different instruction than llmul (smull), so I'm not sure if that particular research is a concern here.

I don't have any tools to objectively measure the timing differences to detect leaks on-hand. I'm not sure if any even exist for measuring PHP software.

So, the answer to your question is "No, but open to suggestions on how to measure and possibly mitigate".

comment 9y ago · link · parent

> Implementing crypto primitives in an interpreted language is full of hazards for side channel attacks - being constant time is just the first step. Cache behavior, branch predictor attacks, etc are also important. And all of the above applies to native code crypto too. When you add an interpreter on top, a ton of new side channels are introduced.

These are the sort of things I'm hoping can be addressed in the planned third-party audit: https://github.com/paragonie/sodium_compat/issues/8

If it turns out that this project is helplessly insecure and there's no way to make it reasonably secure, I'm never tagging v1.0.0. Dead stop.

> The motivation for this project seems to be "not every PHP programmer can install native libs on their $5 hosting platform", which IMO is a pretty poor justification for a new crypto library. Feel free to disagree on this.

I'm specifically more concerned with the second-order effect of what you've described; namely, PHP projects can't require ext/libsodium because they can't expect everyone to easily install it.

I want to get everyone off mcrypt, unauthenticated AES-CBC, RSA encryption with PKCS1v1.5 padding, etc. I'd like to get Ed25519 signature verification built into automatic updates throughout the entire ecosystem. Sodium_compat was the only reasonable strategy to accomplish these goals, given real-world constraints.

> Good thing is that this library will use native libsodium if available, so hopefully the impact of side channels in this isn't that great.

I'm hoping there aren't any, but if there are, that installing the PHP extension mitigates them entirely. It'll make it easier to convince $5 hosting platforms to install the extension. :)

comment 9y ago · link · parent

Some background reading for deeply interested parties:

https://www.sitepoint.com/what-would-you-pay-to-make-27-of-t...

https://paragonie.com/blog/2017/01/let-s-make-2017-year-simp...

The short answer is "compatibility, and so we can get Ed25519-signed updates into e.g. WordPress".

Important to note: If you have the libsodium PHP extension installed, then ParagonIE_Sodium_Compat::foo() will proxy to \Sodium\foo() instead of using our implementation.

Installing the PHP extension gets you timing-safe guarantees AND better performance. I hope that's enough of a bargaining chip to get the extension installed everywhere (and to drive the initiative to make libsodium a core extension in PHP 7.2). https://externals.io/thread/626

1158.

Show HN: Sodium_compat, a Pure PHP implementation of libsodium(github.com ↗)

62 points · by CiPHPerCoder · 9y ago · 10 comments

comment 9y ago · link · parent

About that. https://www.wordfence.com/blog/2016/11/hacking-27-web-via-wo...

comment 9y ago · link · parent

> I take full responsibility for everything I said, but I hope I don't need to take responsibility for other people's posts.

I would never ask you to do so! Thanks for clarifying.

comment 9y ago · link · parent

Jason's report was excellent and the discussion contributed by azet and lvh was also very on-point.

In contrast, some of the Tox team's response makes me want to take up drinking. The "crypto secret club gimmick" remark in particular.

comment 9y ago · link · parent

DNSSEC is something I don't want.

comment 9y ago · link · parent

Do they support DNSCrypt? If not, what would be the main draw to use this over, say, 8.8.8.8?

comment 9y ago · link · parent

> 2. The secret chats still aren't broken. Since 2013, I'd think at least one "crypto expert" (which all said a custom protocol was a bad idea) would have taken the effort to prove it by now.

https://eprint.iacr.org/2015/1177.pdf

1165.

Show HN: Sodium_compat, a Pure PHP implementation of libsodium(github.com ↗)

1 points · by CiPHPerCoder · 9y ago · discuss

1166.

Let's Make 2017 the Year of Simply Secure PHP Cryptography(paragonie.com ↗)

3 points · by CiPHPerCoder · 9y ago · 1 comment

comment 9y ago · link · parent

Announcement post which explains the challenges and motivations: https://paragonie.com/blog/2017/01/let-s-make-2017-year-simp...

1168.

Show HN: Sodium_compat, a Pure PHP implementation of libsodium(github.com ↗)

2 points · by CiPHPerCoder · 9y ago · 1 comment

comment 9y ago · link · parent

That's coming soon: https://github.com/jedisct1/libsodium/blob/master/src/libsod...
1
383940
60