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

> You can't run a whole economy on altruism

You don't need altruism. You just need autonomy, mastery, and purpose. Those are incentive enough for meaningful work so long as the worker's basic needs are met.

comment 6y ago · link · parent

> Profit is not a sin.

What work do shareholders actually do within the confines of the company?

If you gave a poor unemployed person the investment capital that shareholders have, then from the company's perspective, how do you distinguish them from other shareholders?

That was the parent poster's point.

> Tech treats its workers better than practically any other industry, and there's never been an industry with fewer barriers to industry.

Instead of economic or physical barriers, we have hordes toxic personalities that try to gatekeep people. It's not all sunshine and roses.

comment 6y ago · link · parent

Take a look at all of the open source projects listed here: https://paragonie.com/software

Especially random_compat (145 million installs) and sodium_compat (6.5 million installs + WordPress 5.2).

My revenue for all of this OSS work was precisely $0.00.

When was the last time any of us looked something up in Encyclopedia Brittanica instead of Wikipedia?

The carrot-and-stick incentive model doesn't work for fully self-actualized adults.

I posit that it only works when you use an oversimplified model of human behavior, rather than the messy truth that is humanity.

comment 6y ago · link · parent

There's a conference going on right now at Columbia University in New York called Real World Cryptography if you're interested in seeing what the state-of-the-art looks like for real-world deployment.

https://twitter.com/realworldcrypto

https://rwc.iacr.org

comment 6y ago · link · parent

All of Part I and sections 10-15 of Part II are deployed ubiquitously in most of the world today. As is section 22 of Part III (WireGuard, WPA3, TLS, etc. use AKEs).

The rest of it appears to consist of "areas that theoretical cryptographers are refining in preparation for real world use". This is the stuff that will be deployed in the real world come 2030.

So, to answer your question: More than half of it is actually used today, and at least 80% of it will be used soon. If you're going to take a course in this, it's better to be ahead of the curve than behind it. (Otherwise, we'll all be suffering through textbook RSA ad nauseum.)

comment 6y ago · link · parent

> Until such time as its had a full suite of codebase reviews, including multiple independent security audits, I refuse to touch it for production.

https://courses.csail.mit.edu/6.857/2018/project/He-Xu-Xu-Wi...

https://www.wireguard.com/papers/wireguard-formal-verificati...

https://www.wireguard.com/papers/dowling-paterson-computatio...

https://www.wireguard.com/papers/lipp-computational-2018.pdf

https://www.wireguard.com/papers/kobeissi-bhargavan-noise-ex...

Additionally: https://lists.zx2c4.com/pipermail/wireguard/2019-December/00...

If you use Linux 5.6 when it comes out, you have WireGuard available.

The code that's still under "heavy" development? Mostly the clients for other platforms (i.e. Windows).

comment 6y ago · link · parent

Truncating a hash function to 224 bits put it at the 112-bit security level, which is roughly equivalent to 2048-bit RSA under today's understanding of the costs of distributed cracking attacks.

There are a lot of standards organizations all over the world with various recommendations. https://www.keylength.com collates quite a few of them. Pick the one most closely relevant for your jurisdiction.

Most of them recommend 2048-bit RSA as their minimum for asymmetric security, and AES-128 / SHA-256 as their minimum for symmetric security. This is a [112, 128]-bit security lower bound.

Truncating a hash to 160 bits yields 80-bit security, which is insufficient. 128 bits (64-bit security) is out of the question.

comment 6y ago · link · parent

Truncated hash functions are not vulnerable to length-extension attacks.

Length-extension attacks are relevant when you design a MAC by passing a secret and then a message to a hash function, where only the message is known.

Truncating the hash (which is what SHA-512/256 and SHA-384 do to SHA-512) removes the ability to grab an existing hash H(k || m) (where k is unknown and m might be known) and append junk because a truncated hash does not contain sufficient information to recover the full state of the hash function in order to append new blocks.

comment 6y ago · link · parent

There isn't one within 20 miles of my house, so I think I'll pass on that. :P

comment 6y ago · link · parent

The TL;DR by Ryan Castellucci is excellent: https://twitter.com/ryancdotorg/status/1214578765998645249

> Neat attack. TL;DR: A "non-exportable" finite field Diffie-Hellman private key can be extracted because the key object isn't bound to specific group parameters. XSS the site, do some operations with deliberately weak group parameters, solve for key.

comment 6y ago · link · parent

https://github.com/search?q=sha1&type=Code https://github.com/search?q=sha-1&type=Code

comment 6y ago · link · parent

Because they're already truncated.

SHA-384 is SHA-512 with a different IV (which doesn't affect LEAs) truncated to 384 bits (which gives you 128 bits of resistance against LEAs).

SHA-224 is the same story but with SHA-256 instead (and only 32 bits of LEA resistance).

comment 6y ago · link · parent

I've edited my parent comment to consistently use hyphens.

There are six SHA-2 family hash functions:

  * SHA-224
  * SHA-256
  * SHA-384
  * SHA-512
  * SHA-512/224
  * SHA-512/256
Hope that helps. (I know it's still confusing.)

comment 6y ago · link · parent

This is cheap!

Breaking MD5 for the Flame malware probably set the NSA back millions when you sum the person-hours and CPU time together.

comment 6y ago · link · parent

SHA-256 and SHA-512 are both in the same family (SHA-2).

Latacora says to use SHA-2. If you can get away with it, SHA-512/256 instead of SHA-256. But they're all SHA-2 family hash functions.

https://latacora.micro.blog/2018/04/03/cryptographic-right-a...

No need to bikeshed this. But if you must: SHA-512/256 > SHA-384 > SHA-512 = SHA-256

If you're wondering, "Why is SHA-384 better than SHA-512 and SHA-256?" the answer is the same reason why SHA-512/256 is the most preferred option: https://blog.skullsecurity.org/2012/everything-you-need-to-k...

Additionally, the Intel SHA extensions target SHA1 and SHA-256 (but not SHA-512), which makes SHA-256 faster than SHA-512 on newer processors.

Isn't crypto fun?

316.

The Curious Case of WebCrypto Diffie-Hellman on Firefox(blog.intothesymmetry.com ↗)

81 points · by CiPHPerCoder · 6y ago · 5 comments

comment 6y ago · link · parent

Making /dev/random behave like getrandom(2) will finally put to rest one of the most frustrating arguments in the public understanding of cryptography. Please do it.

comment 6y ago · link · parent

I never disputed the premise anyway. Just that the conclusion doesn't follow from it.

If communities die when bookstores die, sure, you can blame that on what killed the bookstore. But regardless of blame, whose responsibility is it to ensure communities continue? (This isn't the same thing as blame.)

My point isn't "bookstores are the wrong answer". My point is "bookstores aren't the only correct answer". Diversify.

comment 6y ago · link · parent

> They've ran a ton of brick and mortar bookstores out of business, which has effectively destroyed community centers.

Can you really blame Amazon for destroying community centers because they put bookstores out of business?

Bookstores aren't the only viable community center, after all. Most cities and counties have a public library that's supposed to exist for the community's benefit. Additionally, in rural parts of the US, the only real community center you used to find was a church, not a library or a bookstore.

Personally speaking, my community centers exist on Signal, WhatsApp, IRC, Mastodon, Slack, Twitter, Telegram, and Facebook. (And I neglect half of those entirely.) I don't see any need to have a physical watering hole.

comment 6y ago · link · parent

> Given that Amazon employs tens of thousands of people

Hundreds of thousands of people*

https://www.fastcompany.com/90444590/5-signs-your-new-years-...

comment 6y ago · link · parent

Trying to unfuck vim's encryption spawned a very interesting Github thread, if anyone is interested: https://github.com/vim/vim/issues/638

comment 6y ago · link · parent

I asked the guy who wrote "JavaScript Cryptography Considered Harmful" if a JS app would be adequate followed by a winky face.

The /s was implied.

comment 6y ago · link · parent

> NSA recommended people stop using ECC <384 bits

Since when does anyone care about NSA's opinion (who also don't have to care about FIPS compliance)?

comment 6y ago · link · parent

> It just needs a UI.

Would you consider an Electron app adequate? ;)

comment 6y ago · link · parent

I made it better: https://stackoverflow.com/posts/16056298/revisions

comment 6y ago · link · parent

I love the name of your podcast.

comment 6y ago · link · parent

O_O

I posted it in that thread. What the fuck?

comment 6y ago · link · parent

Minor point:

You don't start at zero. You start at one (yourself).

If you're trying to start at zero, that means you yourself don't believe in your own community, and you're doomed to fail.

You also need at least one other person who shares your values and/or interests. A "true fan", so to speak. https://www.ted.com/talks/derek_sivers_how_to_start_a_moveme...

1
101112
60