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

There are a lot of communities, from Reddit's /r/crypto to Freenode's ##crypto channel, which use the "crypto" shorthand for "cryptography" have been around for decades and in the past couple of years have been inundated with cryptocurrency obsession.

TL;DR - The main goal is: "Get off our lawn."

comment 6y ago · link · parent

> usage defines language not the other way around

I say we start referring to cryptocurrencies as "cyber cash" and then abbreviate it to "cyber". If anyone should suffer from appropriated terminology at the hands of blockchainiacs, it ought to be the insufferable sales staff at security industry conferences.

comment 6y ago · link · parent

"and other cryptos"

"but the cryptos"

Please say cryptocurrencies.

http://www.cryptoisnotcryptocurrency.com/

comment 6y ago · link · parent

.

comment 6y ago · link · parent

Under PHP...

> Msgpack is an PECL extension, thus you can simply install it by:

Having something available in PECL is a good first step, but nobody will use it unless you either:

1. Get it into the standard library (which requires an RFC for PHP Internals), OR

2. Write a pure-PHP polyfill installable from Composer, OR

3. Do #2 then #1 (using the polyfill's popularity to argue for the importance of the RFC acceptance to make #1 a reality).

Reason: A lot of the places PHP is deployed, you can't compile C code or install binary dependencies (.so, .dll files). You can't access the OS package manager, either.

But Composer is a pure-PHP package manager that still operates in these environments.

So if anyone on HN ever wants your thing to be used by PHP developers, don't just stop at "PHP extension, written in C, available in PECL".

comment 6y ago · link · parent

> I'm sure there are thousands of people out there who sanitize inputs and outputs naively and don't know about great libs like DomPurify.

Also HTMLPurifier for PHP, and probably several others in other languages.

comment 6y ago · link · parent

I love the acronym.

https://www.urbandictionary.com/define.php?term=FFS

comment 6y ago · link · parent

Full disclosure isn't a crime in the United States, at least.

comment 6y ago · link · parent

No, it became a draft. It just hasn't become a RFC. See: https://github.com/paragonie/paseto/issues/108

comment 6y ago · link · parent

> In practice,if paseto is better I think an internet draft is in order.

https://paseto.io/rfc/

comment 6y ago · link · parent

> ... and if you trust DNSSEC...

I don't, thanks.

comment 6y ago · link · parent

That's not strategic, that's tactical.

Strategic is mocking them to prevent their stupid ideas from spreading. (Public shaming creates a resistance at scale.)

Tactical is breaking from the general strategy to help at an atomic unit (i.e. one person).

comment 6y ago · link · parent

In addition to versioning, we're starting with a very limited set of functionality tuned to security not flexibility.

If you're using v2, you're either signing with Ed25519 or encrypting with XChaCha20-Poly1305. There are no additional knobs or levers. Only boring cryptography.

A versioned JOSE that limited flexibility is dead in the water. JOSE users will bikeshed over backeards compatibility until the end of time. Might as well specify a new standard at that point. Hence PASETO.

comment 6y ago · link · parent

> Adoption? Standardization?

Working on that.

One of the goals of the PASETO project is to eliminate the use of JWT in modern standards, not to eliminate the standards that currently (but hopefully, temporarily) use JWT.

comment 6y ago · link · parent

> I don't like the accusative tone when talking engineering.

That's fair.

I wrote this in 2017 to give a single page arguments against the JOSE standards. The accusative tone is required by the fact that the entire page exists to attack the standard, based on technical arguments.

The target audience of the Paragon Initiative blog has always been "PHP developers", and PHP gives you a built-in session mechanism. Which, if you're writing PHP, you should just use. Session security in modern PHP boils down to "use HTTPS".

If you're doing some massively distributed system (the likes of a FAANG company project), you can disregard the advice aimed at LAMP stacks.

comment 6y ago · link · parent

> Name a security standard written by some one other than DJB that doesn't recommend bad defaults.

Sure, here's one at random: https://github.com/awslabs/aws-encryption-sdk-specification

DJB is not one of the authors of that specification. ;)

comment 6y ago · link · parent

> Oh yes, throw out OIDC and let's go back to SAML.

Aside from tptacek's observation: What prohibits the development of an OpenID Connect PASETO variant? (This is a rhetorical question.)

comment 6y ago · link · parent

> I can surely write some bad libraries for PASETO and someone could come up with the same arguments against PASETO like the OP.

The specification is here: https://github.com/paragonie/paseto/tree/master/docs

If you can write an insecure implementation without violating the specification, please file an issue on Github.

comment 6y ago · link · parent

> I can't find the specification/rfc of Paseto.

https://github.com/paragonie/paseto/tree/master/docs

https://paseto.io/rfc/

> It looks more of a php lib.

https://paseto.io/ -- Several languages implement PASETO.

> To me it seems the author is not familiar with JWT[0]

How does one demonstrate familiarity with JWT beyond analyzing/critiquing the RFCs for JWT and correlating the specific language of the standard with real-world vulnerabilities of JWT implementations?

> and tries to solve the wrong problems(e.g assumes the idp or library being used are compromised.)

Assuming something that has happened several times already isn't a "wrong problem". https://auth0.com/blog/critical-vulnerabilities-in-json-web-...

comment 6y ago · link · parent

> I can forge my servserside session id for session hijacking. This is what I understood.

Forge this. For each session:

    session_id = bin2hex(random_bytes(32))
Yes, you can change what you send to the server. But you can't hijack another user's session in this probability space (2^-256) by blind guessing. Instead, you need another way to leak their credentials to hijack the session.

comment 6y ago · link · parent

> Paseto is dead in the water and will never gain any traction.

We'll see about that. :)

> Every single company has no choice but to support JWT in some capacity.

This will change soon.

> Whenever one has to use social auth (Google/Facebook/twitter), or Microsoft products (ADFS/Office365), or third party authentication solutions (Okta/auth0), they're de facto dealing with OpenID Connect + JWT (or SAML but that's a different topic).

The plan for PASETO has always been to make it a JWT alternative for OIDC.

First comes the XChaCha RFC.

Second comes the PASETO RFC.

Finally, the OIDC-PASETO RFC.

1. https://tools.ietf.org/html/draft-irtf-cfrg-xchacha-03

2. https://github.com/paragonie/paseto/blob/master/docs/RFC/pas...

3. https://github.com/paragonie/paseto/issues/5

comment 6y ago · link · parent

Give me a few months, then. :P

If they agree it's a good idea, it should pick up quickly.

comment 6y ago · link · parent

> Anyone got insights as to how mainstream Paseto is getting?

Okta's a pretty big name in authn/authz and their engineers recently published an open source PASETO implementation.

https://developer.okta.com/blog/2019/10/17/a-thorough-introd...

https://github.com/paseto-toolkit/jpaseto

comment 6y ago · link · parent

> Lols, you searched for Lattice reduction. We never studied that in our universities.

Sounds like a missed opportunity to me.

comment 6y ago · link · parent

Counterpoint:

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

comment 6y ago · link · parent

I decided to test this empirically by selecting a computer science topic at random*

https://www.youtube.com/results?search_query=bkz+reduction

1. https://www.youtube.com/watch?v=c3Trwclh_Z4

2. https://www.youtube.com/watch?v=EapIVDlhvQU

3. https://www.youtube.com/watch?v=3cicTG3zeVQ

---- The scrollbar of my browser cuts here ----

4. https://www.youtube.com/watch?v=9i9BCsHxofE

...

* random may or may not have been influenced by Dual EC

comment 6y ago · link · parent

> There's always gonna be those people in every single community.

Violent crime is also a grim reality we all have to live with, even if things are as a whole improving (statistically).

> I found the page hilarious, wonder if I've become desensitised.

That's not necessarily a bad thing. Maybe it can come in handy (e.g. easier to remain calm in a bad situation). I hope neither of us ever has to find out.

comment 6y ago · link · parent

> Relax and keep your emotions in check.

I don't think it's medically possible for me to relax more than I am right now without losing consciousness, thanks.

> They are not irrationally scared of Indians,

The term "phobic" doesn't just mean "irrationally scared", it also refers to cognitive distortions and feelings of contempt.

> they are annoyed that Indian videos are flooding their feeds,

The fact that the content is low quality or in a language the viewer doesn't understand is orthogonal to the people who made the video being Indian. Focusing on that fact instead of the actual problem shows a racial and/or national discriminatory motive and should be addressed.

> they want different content and that is common sense in this context. If the Indian videos were if sufficient quality the problem would be somewhat tempered, but they are not of sufficient quality to overcome their inappropriate placement.

Only "somewhat" tempered?

comment 6y ago · link · parent

The comments in that discussion seem a bit xenophobic.

There is value in being able to reliably filter by language. After all, if you can't understand a lecture video, then there's little point in watching it.

But how some of the commenters choose to express their thoughts comes across more as "I hate people from India" than "This is inconvenient".

1
789
60