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

The point of political discourse is never to change your opponent's mind, it's to sway the undecided people to align with you instead of them.

That's why it's so adversarial.

comment 8y ago · link · parent

> As to preventing timing attacks you can add a delay to give a uniform response time.

You have to be very careful with how you implement the delay to prevent the timing signal from still propagating to the attacker.

https://blog.ircmaxell.com/2014/11/its-all-about-time.html#A...

comment 8y ago · link · parent

Immediate takeaway:

It took attackers 76 days to download the data (from 51 databases) on 145.5 million Americans, in small increments to avoid detection.

604.

US GAO post-mortem report on Equifax hack [pdf](gao.gov ↗)

3 points · by CiPHPerCoder · 8y ago · 2 comments

comment 8y ago · link · parent

I suspect this was answered by this line of Thomas's post:

> If you're interested in doing security work, and you can code, you can't waste my time.

comment 8y ago · link · parent

They're in the works.

https://git.zx2c4.com/

comment 8y ago · link · parent

There was a finding! A very very minor bug in the keepalive timer's rounding.

I mean, it's something.

comment 8y ago · link · parent

Can I suggest rel="noreferrer noopener"?

https://www.jitbit.com/alexblog/256-targetblank---the-most-u...

comment 8y ago · link · parent

It is, indeed.

comment 8y ago · link · parent

> Even if you did consider it a flaw in the RFC itself, the fact that there was a flaw once-upon-a-time with a specific aspect of JWT, doesn't invalidate the whole idea of JWTs.

The premise that went into JWTs was not invalidated. Their design was proven by multiple incidents to be error-prone, so I sought to replace JWTs.

The result? https://paseto.io

comment 8y ago · link · parent

"Just sign this opaque blob"?

Digital signatures aren't in the scope of the cryptographic doom principle. Generally, if you're signing a document, you want it to be really clear that you signed what it says.

comment 8y ago · link · parent

Also, this limitation is easily worked around.

1. Use a digital signature.

2. Encrypt your signed message using Hybrid Encryption.

After your recipient decrypts your message (which, as Thomas notes, has AEAD), they can then verify your signature.

comment 8y ago · link · parent

> It's totally common and perfectly innocent to casually mention that "you know, this issue we're discussing on this thread I also have a work, and why do you say this approach sucks and which do you then suggest".

The structure of the comment in question is also relevant:

"This is a real production issue for me, so could you [...]"

This reads like a demand if you parse it in spoken English.

If it helps, imagine working in retail and hearing a disgruntled customer ask you to hurry up and give them priority service. Their request might be structured like, "I need to pick my kids up from school at 3, so could you hurry it up?"

Your word choice is far less demanding than theirs. If they wrote their comment the way you just wrote yours, it wouldn't have struck me that way.

The entire reason I brought it up was because I was unsure of the intent. They clarified their intent. I believed them. Life moved on. You're still trying to litigate this.

But none of this matters. What matters is, they didn't intend it that way, and JWT sucks.

> In fact it happens all the time on HN, between regular developers, the occasional star scientist or programmer (from Alan Kay to Ryan Dahl and Dan Brown), and even far more important and busy pros than some security expert, and I've never heard anybody counting their lost pennies from what they'd have gained if they charged for talking to them...

To be fair: me neither. But knowing how humanity is, I wouldn't totally discount that it does happen somewhere on the Internet (maybe even HN).

comment 8y ago · link · parent

> So that it's a "real production issue" for them is irrelevant.

I respectfully disagree.

If it was truly irrelevant, it didn't need to be brought up in the first place.

But it was, and it's what made me believe that the other person was trying to solicit for a security expert to solve a production problem for them without an invoice being involved. It was relevant to my interpretation.

They insist they didn't mean it that way, and I believe them, but it was still relevant.

Whether or not it was relevant in the comment I replied to, it became relevant once it was entered into the discussion.

You can call that "uncharitable" if you want. I don't really have a horse in that race.

comment 8y ago · link · parent

> These are vulnerabilities in specific implementations of JWT.

No, these are vulnerabilities in the standard itself.

I outlined the arguments here: https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...

It's an error-prone cryptographic design that needs to be replaced.

Blaming implementations for faithfully implementing a flawed standard is a stupid thing to do, since it doesn't solve their insecurity.

comment 8y ago · link · parent

It's not unsolvable, just incompatible with the premise of "use JWT for sessions" which is to avoid the database hit entirely.

comment 8y ago · link · parent

https://github.com/kryptco/krypton-android/blob/e5e1399caea4...

You weren't kidding. :(

comment 8y ago · link · parent

I'm happy to hear you didn't mean it that way.

comment 8y ago · link · parent

> Not sure where you are getting the "free work" part of this from, unless you want to be paid per comment.

Oh, that's easy to explain. You said:

> This is a real production issue for me, so could you please elaborate on why you think one of these (whichever you prefer) is better or link me to a source?

Specifically:

> This is a real production issue for me,

If you want a cryptographer (i.e. lvh) to solve a real production issue for you, that would in most cases be a business transaction.

comment 8y ago · link · parent

> I've even read security reports by supposedly reputable security consultants also claiming that JWTs are bad but their arguments are hand wavy and make no sense.

https://auth0.com/blog/critical-vulnerabilities-in-json-web-...

https://blogs.adobe.com/security/2017/03/critical-vulnerabil...

These were critical vulnerabilities enabled by an error-prone cryptographic design that broke real systems.

Don't pretend it's hand-wavy.

comment 8y ago · link · parent

It sounds like you're arguing from a very specific mental model of an ACL workflow.

In my CMS, I had support for granular permissions. So you could do this:

  if ($user->can('update')) {
    if ($postData) {
       $this->processUpdate($postData);
    }
    // display edit form
  } elseif ($user->can('read')) {
    // read-only
  } else {
    return error_403_condition();
  }
JWT wouldn't have helped much.

comment 8y ago · link · parent

I'm not sure how you intended this comment, but it reads a bit like a solicitation for lvh to do free work.

I wrote PASETO, with a lot of feedback from cryptographers and security engineers, to avoid a lot of the design flaws of JWT.

Learn more about it here: https://paragonie.com/blog/2018/03/paseto-platform-agnostic-...

You can find a lot of implementations available: https://paseto.io

(Also: You almost certainly want to use v2)

comment 8y ago · link · parent

You're getting closer to the problem:

JWTs were designed to be single-use (or very, very short lived) claims (with optional cryptography features).

It was never meant to be "offload everything to the client and obviate the need for server-side storage". It was never meant to be the new hotness among the NoSQL Scalability crowd.

comment 8y ago · link · parent

> I have trouble understanding why session invalidation with JWT's is challenging.

Imagine you're connecting to a service that uses JWT for sessions so they don't have to store anything server-side.

Let's say you have a token with an IAT of yesterday and and EXP of, say, a month from now.

Further, your browser gets infected with malware and the attacker steals your token. You rebuild your computer from a fresh install.

How does the service invalidate the token while still being stateless? It has 30 days left.

Your next move is:

> _

comment 8y ago · link · parent

I've been fond of [1] and [2] for a more focused argument against JWT for sessions.

The JOSE standards (of which JWT is a member) are error-prone and have had numerous critical security-affecting bugs due to how they were designed. [3]

To remedy that, I proposed PASETO. [4]

I still don't recommend PASETO for sessions, because of the arguments laid out in [1] and [2].

[1] http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-fo...

[2] http://cryto.net/%7Ejoepie91/blog/2016/06/19/stop-using-jwt-...

[3] https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...

[4] https://paseto.io

626.

Security Concerns Surrounding WebAuthn: Don't Implement ECDAA (Yet)(paragonie.com ↗)

2 points · by CiPHPerCoder · 8y ago · discuss

comment 8y ago · link · parent

I'd like to make but one appeal to everyone reading this thread:

Ask your cryptographer if the algorithm they're proposing you to use is IND-CCA2 secure (especially if it meets the criteria for IND-CCA3).

Litmus test: If they don't know what that means, you shouldn't be trusting them for cryptography advice.

If it isn't IND-CCA2 secure, you shouldn't be using it. Full stop.

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

The IND in IND-CCA2 means "INDistinguishable"; i.e. from randomly generated line noise. For symmetric cryptography, your ciphertext shouldn't have any structure to it. (Lattices and such are a different story. If structure is permissible for your security goals, you're probably doing asymmetric cryptography anyway.)

To be clear: Format-preserving, order-preserving, order-revealing, and homomorphic encryption technology-- while an exciting research area-- fails to meet this requirement and should not be used for non-experimental purposes until their techniques have had time to mature. And even then, until they meet this requirement, only when the threat model doesn't realistically include the possibility of adaptive chosen-ciphertext attacks. (Spoiler: A real world threat model will almost certainly always include that.)

> We use FF1 and are actively engaging with the world's leading cryptographers

I've seen this "we engage with the world's leading cryptographers" genre of claim before, albeit from a much more arrogant source: https://news.ycombinator.com/item?id=6916860

comment 8y ago · link · parent

H(ssn) just kicks the problem downstream.

  - If H is a simple cryptographic hash function, it's not resistant
    to brute-force attacks to recover the SSN
  - It's not revokable
What we need is something more akin to a Credit Card number. Something like an abstraction layer. It might even be implementable as a UUID.

If you need to revoke it, you can do so since it's not cryptographically tied to anything.

Failing that, a base32-encoded random string (without = padding) with an optional checksum would do the trick.

629.

Security Concerns Surrounding WebAuthn: Don't Implement ECDAA (Yet)(paragonie.com ↗)

1 points · by CiPHPerCoder · 8y ago · discuss

1
202122
60