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

This is pretty awesome, but there is no LICENSE file so I'm assuming no one is allowed to use it in their own projects.

comment 10y ago · link · parent

SVG also has more risk: stored XSS, which isn't something you'd expect from a file whose MIME type starts with "image/".

https://github.com/w3c/svgwg/issues/266

comment 10y ago · link · parent

I want to also add that this isn't an attractive deal for me as an unattached 20-something.

comment 10y ago · link · parent

Okay, I've made it explicit.

https://paragonie.com/blog/2016/09/untangling-forget-me-knot...

comment 10y ago · link · parent

> But nerdery aside, unless I'm missing it, this piece seems to be lacking one of the most important controls for password resets:

> Invalidate reset records after use, after any password change, and after a fixed (short) amount of time.

That was (somewhat implicitly) covered in the "what incumbent systems" do: https://paragonie.com/blog/2016/09/untangling-forget-me-knot...

Since you mention it, I'll make that a separate list item. It's important enough to risk being repetitive about.

comment 10y ago · link · parent

> Just having the option would generate an untenable amount of expensive support calls.

I can see the potential for that to be true, but I don't think there's any evidence that this is necessarily true.

Specifically: If you bury the option where only power users (i.e. the kind of users who are likely to use GnuPG and KeePassX) will trivially find it, the sort of folks who never change defaults would leave it enabled.

comment 10y ago · link · parent

That depends on your threat model and your audience.

If you're building a typical e-commerce platform, no, it won't. That's why the recommendation is so watered down with "if reasonably practical" and has entire sentences dedicated to "it's OK if you default to Yes, but please give them a choice".

But if you're building the next Silk Road? You should default to opting users out unless they check the opt-in box.

comment 10y ago · link · parent

The other post that was linked in the snippet that mentions base64 is far more likely to make people nervous: https://paragonie.com/blog/2016/06/constant-time-encoding-bo...

It's about an implementation of RFC 4648 encoding (including base64, base32, etc.) that doesn't index based on secret data.

Consequently, if a practical cache-timing exploit is ever demonstrated in existing implementations of encoding functions, the open source library we wrote will be immune.

comment 10y ago · link · parent

> The "split token" password reset is snake oil.

One of two things just happened:

  1. You're being intentionally offensive where it's not really warranted
     by calling this proposed strategy snake oil.
  2. You don't know what snake oil means.
I'm going to assume the latter. Here's the thing:

  - Hash functions are deterministic. You'll make timing attacks more
    difficult, but you aren't removing the underlying timing leak.
  - You database engine almost certainly doesn't compare strings in
    constant time in SELECT queries, so there's almost always going
    to be a timing leak in SELECT queries.
  - Separating the timing leak from the authentication (and making the
    latter constant-time) properly alleviates this risk.
Other solutions (relying on the avalanche effect of hash functions, using a random sleep, or sleeping until a minimum amount of time has passed) are brittle and harder to reason about than solving the problem directly, which is what the article proposes.

See also: http://stackoverflow.com/a/28486617/2224584

You might disagree with the technical details and arguments laid out, but it isn't snake oil.

1330.

Secure Account Recovery Made Simple(paragonie.com ↗)

15 points · by CiPHPerCoder · 10y ago · 20 comments

comment 10y ago · link · parent

> There are very good reasons though,

Okay, I'd really like to hear the argument about why muddying the waters about an already-hard-to-understand subject is totally fine.

> and it's probably time I made a post about it.

Please do.

A blog post that I linked elsewhere in this thread makes the case for why it's harmful.

comment 10y ago · link · parent

GPL is fine for this use case. AGPL might be considered too aggressive for some people.

Don't let people bully you here though. Choose the license that makes sense for you. I think you want GPL, but that's not for me to say.

1333.

Crypto-Misnomers: “Zero Knowledge” Considered Self-Descriptive(paragonie.com ↗)

3 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

> I wish we had a clearer term for systems where you don't trust an intermediary with some kind of access.

We already have one or more of:

  - Confidential
  - End-to-end encrypted (contrasted with, but often in addition to,
    transport-layer encryption)
  - Privacy-preserving
  - Least authority (with respect to the service operator)
  - Peer-to-peer privacy
I'm one degree of separation from several SpiderOak engineers and think highly of them overall. However, this choice of marketing copy is one point we vehemently disagree on.

comment 10y ago · link · parent

Counter argument: https://paragonie.com/blog/2016/08/crypto-misnomers-zero-kno...

Summary: zero-knowledge applies to authentication protocols, not encryption protocols.

comment 10y ago · link · parent

The title also begs the question!

Is sex fun? Most people might say "Yes", but not quite 100% of the population.

comment 10y ago · link · parent

I propose "dud"

1338.

Implementing Secure “Password Reset” Features in Web Applications(paragonie.com ↗)

3 points · by CiPHPerCoder · 10y ago · discuss

1339.

Implementing Secure Password Reset Protocols in Web Applications(paragonie.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

1340.

Untangling the Forget-Me Knot: Secure Account Recovery Made Simple(paragonie.com ↗)

1 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

Wouldn't that require you to retain all compromised keys, and daisy chain the encryption operations?

comment 10y ago · link · parent

If you encrypt instead of peppering, you just decrypt then re-encrypt with a new key and call it a day.

Peppering has always meant, to me, doing something like this:

  // Hashing
  $preHash = base64_encode(
      hash_hmac('sha512', $password, $_ENV['pepper'], true)
  );
  $storedHash = password_hash($preHash, PASSWORD_DEFAULT);

  // Validation
  $preHash = base64_encode(
      hash_hmac('sha512', $password, $_ENV['pepper'], true)
  );
  if (password_verify($preHash, $storedHash)) {
      // You're in!
  }
To anyone reading this: Don't bother peppering.

comment 10y ago · link · parent

Teach the controversy! Even if there isn't one.

> But if someone asked, and they didn't have a very specialized application, I'd tell them that switching to scrypt from bcrypt, or even PBKDF2, would be a waste of money.

Argon2/scrypt/bcrypt/PBKDF2 are fine. I think PBKDF2 is the worst choice, but is still acceptable.

The real problem is the prevalence of md5($password) e.g. in software like Piwik.

comment 10y ago · link · parent

If you had two users with a very long password, but the first 100 characters were identical, they'd collide.

  - Pre-hashing makes this less likely.
  - Encoding the pre-hashed value to prevent NUL bytes is important.
But it's a bandaid solution, to be quite honest. We're better served by migrating to Argon2i, which doesn't have these quirks.

comment 10y ago · link · parent

Nitpick to counter your nitpick: Not necessarily.

It's an AE construction, but not necessarily an AEAD construction. You can have IND-CCA3 security without additional data.

The converse is also not necessarily true (i.e. an AEAD scheme could be based on MAC-then-Encrypt and IIRC there are some that are built that way), but that's a less useful counterpoint. The recommended AEAD constructions (AES-GCM and ChaCha20-Poly1305) are EtM.

comment 10y ago · link · parent

This is a blog post from 2016 about how they're doing things now, someone mentioned a mistake they made (and fixed in hours) over five years ago.

That doesn't deserve an invocation of the "rekt" meme at all.

It's highly likely that their current success was based on learning from their previous mistakes. They should be applauded for improving rather than treated with snark for having ever fumbled.

comment 10y ago · link · parent

Their solution is very similar to the mode prescribed by [1] and implemented in [2].

There are actually two problems with bcrypt:

  - It truncates after 72 characters
  - It truncates after a NUL byte
If anyone is dead set on following Dropbox's example, make sure you aren't passing raw binary to bcrypt. You're playing with fire.

Additionally, if you're going to use AES-256, don't implement it yourself. Use a well tested library that either uses AEAD or an Encrypt then MAC construction.

[1]: https://paragonie.com/blog/2016/02/how-safely-store-password...

[2]: https://github.com/paragonie/password_lock

1348.

Secure Account Recovery Made Simple(paragonie.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

> Most doing heavy lifting don't make SF wages or have office costs that high.

I work remotely from home and don't make anywhere near as much as someone in the valley. However, I'm quite happy with my cost of living. :)

comment 10y ago · link · parent

I think $2.91M is a modest (if not lean) budget for the important work they're doing.

How many websites now have HTTPS because of LetsEncrypt? How much would they have needed to pay for certificates from an incumbent CA?

1
444546
60