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

> They do encrypt group messages to their servers, just not E2E.

Transport-layer encryption that leaves messages totally readable to the service operator should not be classified as "they do encrypt". It muddies the water and will confuse users.

For the sake of communicating risk effectively, only E2E should count when we talk about encryption. Lack of transport-layer security (TLS, Noise, etc.) simply demonstrates severe negligence and/or incompetence.

> I'm not offering security advice.

Above you said:

> WhatsApp had a severe vulnerability for groups disclosed not so long ago. Telegram has had no such vulnerabilities as far as I'm aware.

A casual observer might read this and think, "Wow, WhatsApp is vulnerable and Telegram isn't. I should use Telegram" despite being even more at risk by choosing Telegram.

Whether it was your intention or not, it will have the same effect on HN readers as formal security advice from any other commenter.

comment 8y ago · link · parent

> I don't really have the technical knowledge to evaluate it myself, and I suspect 99% of the people in HN are in the same position. Therefore, if I were to say "Signal's security is excellent" I would be falling for the cult of Moxie myself, not an informed opinion.

Sure, but that's not what's happening when people whose day-to-day involve applied cryptography and/or application security are commenting on MTProto and Telegram.

Here's a good read on why Telegram's "contest", which is a challenge meant to create the illusion of resilience, is totally bogus in the context of real-world cryptography: http://www.cryptofails.com/post/70546720222/telegrams-crypta...

The things that the Signal Protocol does well:

1. It maximizes forward secrecy,

2. while working for mobile devices that may be offline or unreachable,

3. and uses authenticated encryption.

https://tonyarcieri.com/all-the-crypto-code-youve-ever-writt...

https://paragonie.com/blog/2015/05/using-encryption-and-auth...

Disclaimer: The last link (the paragonie.com one) was my writing on the subject.

comment 8y ago · link · parent

Accessing the group means:

1. Announcing your intrusion

2. Only being able to read what people say after you joined

That's a far better security proposition than server operators being able to silently spy on everything you ever send.

comment 8y ago · link · parent

> WhatsApp had a severe vulnerability for groups disclosed not so long ago.

It had a vulnerability, but not a severe one, and certainly not one that could be exploited silently or lead to retroactive message decryption.

The vulnerability was: If you pwn the server, you can join a group without being invited, which means subsequent messages would be plaintext to you. However, everyone gets notified of a new arrival.

> Telegram has had no such vulnerabilities as far as I'm aware.

That's because Telegram doesn't encrypt groups or channels at all.

> This reinforced my impression that HN's mantra that "Telegram's encryption is bad" is more a personality cult to moxie than an informed opinion.

I don't particularly like Moxie, personally, but his work stands on its own merits.

EDIT: Because the wording was ambiguous, I want to clarify: I don't particularly dislike Moxie, either. I'm neutral to his personality, largely due to a lack of personal interaction with the man.

comment 8y ago · link · parent

For the lazy: https://security.stackexchange.com/a/49802/43688

comment 8y ago · link · parent

Very much so. It uses the Signal Protocol.

comment 8y ago · link · parent

> Monero, the most prominent fork of Bytecoin, the result of years of work of a very dedicated community, probably the most anonymous currency in circulation today - in the form of an ERC20-Token?

What about Zcash? I'm pretty sure that's a serious contender for the title of "most anonymous".

788.

The Case for Automatic Updates(dev.to ↗)

1 points · by CiPHPerCoder · 8y ago · discuss

comment 8y ago · link · parent

> Today we wrote up an article about this, actually, referencing your guide:

Neat. I'll have to give that a read in the morning.

Although, it looks like one of your links in the opening paragraph under the "Web Security in 2018" header is broken, and presumably that was the one meant to link to our guide.

comment 8y ago · link · parent

Side-channel attacks against base64 encoding have yet to be proven, but constant-time implementations are available just in case.

My contribution is here: https://github.com/paragonie/constant_time_encoding

comment 8y ago · link · parent

> But that doesn't mean you should be send and storing password hashes to the server, even if generated by PHP.

There is prior work in this genre. Something like SPAKE2-EE might be worth looking into here. https://github.com/jedisct1/spake2-ee

> It doesn't mean you should be using the session cookie alone as a bearer token to access a session.

Well, maybe.

A random ID that just tells PHP where to look for the session data, with all the data persisted server-side, is secure as long as it's transferred over HTTPS. Most frameworks/libraries abstract the implementation details away, but generally:

  <?php
  use ParagonIE\ConstantTime\Base32;
  $random = Base32::encode(random_bytes(32));
This value will be unpredictable and doesn't require an HMAC to ensure this property. The only time the HMAC adds value is if you're using the user's computer as a data mule for the entirety of session state rather than "look up this identifier in a database".

In those use-cases, you enter the usual JWT abuse territory, as outlined here: http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-fo...

In this genre, we're working on PAST (although this is probably going to be renamed before it's finalized) to solve the cryptography flaws baked into the JWT standards (collectively, JOSE): https://github.com/paragonie/past

That doesn't solve the "replay attack" issue (which may be what you were referring to with bearer tokens).

> OH AND YOU SHOULD ALSO BE USING A PRIVATE KEY PER USER TO ENCRYPT DATA AT REST ON YOUR DATABASE, AND STORE THIS KEY IN THE DB MULTIPLE TIMES - EACH ONE ENCRYPTED BY THE USER'S DEVICE KEY.

I'm not entirely sure what you're getting at here. If I needed to share a key across devices, I'd either use Diffie-Hellman or Shamir Secret Sharing to accomplish the task (depending on use-case and threat model).

Perhaps there's a lot of implementation detail that's not being discussed here that I'm missing and what you're saying is a conservative local maximum, but it stuck out a tad bit.

comment 8y ago · link · parent

Please tell me you've seen this before? https://www.nccgroup.trust/us/about-us/newsroom-and-events/b...

comment 8y ago · link · parent

extract($_REQUEST);

Look, one-line register_globals polyfill.

comment 8y ago · link · parent

Most of the Internet (5 out of 6 websites) is powered by PHP. This is true despite people saying "don't use PHP".

I didn't imply that 83% of developers use PHP. I'm sorry if anyone read it that way. I'm zeroed-in on the "what powers the Internet" statistic.

comment 8y ago · link · parent

> but why should this effort be made for PHP?

See https://w3techs.com/technologies/overview/programming_langua...

Anyone who wants a more secure Internet must necessarily be interested in improving the security of PHP.

comment 8y ago · link · parent

> Can you get StackOverflow to "sponser" this idea?

Possibly. I wouldn't even know where to begin.

> Because the problem is there are many "old" accepted answers, with high upvotes, that will always come up as number 1 or 2 in google searches.

Yeah, that's my concern. I can definitely edit anything tagged [php], due to having a gold [php] badge, and I think I can edit anything because I have a reputation higher than 10,000.

The hardest problem for me, here, is identifying these old accepted answers with high upvotes.

My general approach is something like this:

https://stackoverflow.com/questions/tagged/php+encryption?so...

https://www.google.com/search?q=site%3Astackoverflow.com+php...

comment 8y ago · link · parent

That's more of a "open source library" goal of mine: https://github.com/paragonie-scott/public-projects/issues/6

comment 8y ago · link · parent

That's certainly a novel approach to solving the problem.

I'm hesitant to do this myself, because it might open us to legal action, and I don't have the emotional bandwidth or cash reserves to fight a lawsuit right now.

comment 8y ago · link · parent

That's sort of what I'm asking people for, except presented as a choice.

I'll update the article to try to make it clear that "link to clearly superior content" is a viable alternative to rewriting said content, as long as the same goal is achieved.

comment 8y ago · link · parent

And we've been working on that.

* https://wiki.php.net/rfc/libsodium (PHP 7.2)

* https://wiki.php.net/rfc/mcrypt-viking-funeral (PHP 7.1)

* https://wiki.php.net/rfc/random-function-exceptions (PHP 7.0, largely the result of a mailing list discussion critiquing the original implementation of the new CSPRNG functions)

There is plenty more we want to work on in the coming months.

comment 8y ago · link · parent

> Did you consider focusing on publishing and promoting net new content instead?

We've been doing that for years. We've hit diminishing returns because:

1. There is a lot of incumbent material in the same genre, most of which is 10+ years old, but people still link to it in droves.

2. We don't support the at-best-sketchy SEO industry that's sometimes arm-in-arm with adware.

If you read the 2018 guide this post mentions a few times, you'll notice that it, in turn, links to relevant blog posts (and open source libraries) spanning back to early 2015.

802.

Our Ambitious Plan to Make Insecure PHP Software a Thing of the Past(paragonie.com ↗)

139 points · by CiPHPerCoder · 8y ago · 90 comments

comment 8y ago · link · parent

> If you need time to mourn, then take it. But do not denigrate those who would honor those fighting for all of us by making sure that there isn't more to the story.

I would think people who care so much about online privacy would be capable of shutting their mouths for a short bit of time to give the friends and family of the deceased a chance to mourn. But what do I know?

comment 8y ago · link · parent

> This sounds a lot like ripple:

It's way more like Certificate Transparency than Ripple. Chronicle has nothing to do with payments or currency. It's just a ledger.

comment 8y ago · link · parent

> The fact that both Aaron Swartz and James Dolan committed suicide does, indeed, smell. In the past, our government has shown itself capable of [grabbing people off the street for mind control experiments](https://en.wikipedia.org/wiki/Project_MKUltra).

Or maybe it's that there's a high incidence of mental illness among particularly intelligent humans, and even more particularly cryptography/privacy engineers?

https://en.wikipedia.org/wiki/Alan_Turing

https://en.wikipedia.org/wiki/Len_Sassaman

The problem isn't some secret nefarious government mind control program. The problem is that we, as a society, are still very bad at caring for our most vulnerable people.

More importantly, the timing here is suspect: Many HN users are just now finding out about his death, and need time to mourn. Bringing up conspiracy theories-- even if they were true-- is poor form.

comment 8y ago · link · parent

https://bugs.chromium.org/p/project-zero/issues/detail?id=12...

> Project Member Comment 4 by hawkes@google.com, Aug 7

> Labels: Deadline-Grace

It looks like Ben Hawkes would know the reason why, but I think the speculation that this grace period was done due to the scope and severity of this finding is likely correct.

comment 8y ago · link · parent

> I don't understand the common sentiment on HN that "you don't need a blockchain, just an append-only decentralized database with Merkel root logs", as if that's something easy to build.

In my case, this sentiment accompanies an implementation in the form of an easily-deployable open source microservice.

https://github.com/paragonie/chronicle

If it's too hard for people to build, they can use what I wrote.

> What is this hypothetical non-blockchain, where are you going to get it, and why not just use a blockchain if that's what you need?

That's the tx/s limit on Bitcoin today? I can do hundreds of writes per seconds to Chronicle on a modest VM without sweat. This is possible because it's centralized, albeit supports mirroring (i.e. replication) and cross-signing.

comment 8y ago · link · parent

A distributed ledger doesn't necessarily mean a decentralized one.

This is a handy reference to decide if you're building a cryptographic ledger or a blockchain: https://gist.github.com/joepie91/e49d2bdc9dfec4adc9da8a8434f...

comment 8y ago · link · parent

People are trying to solve a lot of interesting problems with blockchain, but I fear it's become the ultimate shoehorn solution for the modern era. See also: https://tonyarcieri.com/on-the-dangers-of-a-blockchain-monoc...

I've had meetings with prospective clients that opened with, "We have $problem, can we use blockchain to solve it?" where anything that doesn't qualify as a blockchain is cast to the wayside because it doesn't scratch that buzzword itch.

(Amusingly, I've witnessed one pitch where the person called it "bitchain" and it sounded like "ba-ching!" and I was waiting for the follow-up to what I thought was onomatopoeia for a cash register sound. I've since learned to not abbreviate cryptography as "crypto" lest I attract sketchy prospects.)

A lot of the problems that you might want to solve with a blockchain probably doesn't need a blockchain. A distributed, append-only cryptographic ledger will suffice. To wit: https://paragonie.com/blog/2017/07/chronicle-will-make-you-q...

comment 8y ago · link · parent

> They were no longer interested in chatting, and didn't laugh at my lame jokes.

Was this because:

  A. They never liked your "lame jokes" in the first place and were
     behaving without integrity in the past?
  B. The politics got to them and they ceased to enjoy the finer things in life?
I like puns. When I was depressed years ago, I had a hard time laughing at any jokes, even really clever puns. I also became quieter and more reserved.

It's very likely you've got anecdotes that would support A over B, but as an outsider, I'm cautious to assume. :)

1
262728
60