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

So we've moved from the clipper chip to, prospectively in the near future, the Clapper chip. History is trying to repeat itself, but this time we have legal precedent.

https://en.wikipedia.org/wiki/Bernstein_v._United_States

https://blog.cr.yp.to/20160315-jefferson.html

All this sort of tactic will do is result in irreparable damage to the tech sector and the US economy. No murders, rapes, child abductions, terrorist plots to destroy buildings, or whatever other specters they summon to haunt us will be prevented.

comment 10y ago · link · parent

Unless I'm wrong and this person is relevant to the community, this looks like SEO/copywriter blog spam to me.

The old "Here's a list of products/things with a 'catchy' headline to incentivize linkbacks and boost my search engine ranking for the words in said 'catchy' headline" trick.

But the contents of the article are kind of empty. And as codeulike said, at least one of the entries is satire. The quality is questionable at best.

Or maybe I haven't had my morning coffee yet and I'm overlooking a crucial detail. Please fill me in if that's what's happening.

1713.

On the Design and Implementation of a Stealth Backdoor for Web Applications(paragonie.com ↗)

3 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

Sounds like a lucrative itch to scratch.

comment 10y ago · link · parent

What do you mean by probation periods? Something like...

"Hi, I'd like to ask you to work for a very temporary contract with us so, if it doesn't work out, you have to scramble to find more work and maybe risk homelessness."

comment 10y ago · link · parent

Sure, but it's O(n) rather than O(n^2).

Hiring decisions are hard to generalize, because different companies have different needs at different times.

comment 10y ago · link · parent

Just as grep and cat solve different problems, work-sample tests and traditional resume-based hiring practices select for different candidates.

I wasn't arguing in favor of work-sample tests for every company and every candidate, just saying their scope is different (although work-sample tests are more likely to find the untapped potential in the marketplace).

comment 10y ago · link · parent

The problem is: Writing good resumes and having a lot of experience with programming is a good heuristic for "experience" and "knows how to play the game" but not meaningfully useful for "excellent at programming".

Work-sample tests measure the latter.

A worker's experience is a heuristic for programming skill, but a heuristic of a heuristic is like an average of a set of averages: Useless.

comment 10y ago · link · parent

Java, C#, and Node.js come to mind immediately as good candidates, but any beginner-friendly language probably need it to some degree.

The Node.js core is particularly bad: It only offers OpenSSL's userspace RNG rather than the operating system's CSPRNG. (That's what window.crypto.getRandomValues() hooks into.) Many of node's deficiencies are tackled by the community, of course. For example: https://www.npmjs.com/package/scrypt-for-humans versus the native PBKDF2 (with no constant-time comparison).

I hear Ruby's SecureRandom still refuses to switch from /dev/random to /dev/urandom as well. Feel free to throw your hat in the ring on that issue.

Historically, C# doesn't have as strong of an open source culture, but if you wanted to make an impact, you could try to nurture it into growing explosively.

But generally: Look at the languages you're already familiar with and see if bad security advice gets more attention from non-experts than from experts. If that's the case, go out of your way to learn how to do things better (if you aren't already well informed) and publish your corrections.

comment 10y ago · link · parent

That depends entirely on the framework in question.

comment 10y ago · link · parent

Up until last year, typing "PHP [anything security- or cryptography-related here]" into any popular search engine would lead you to bad practices.

Then this happened: https://meta.stackoverflow.com/questions/293930/problematic-...

Stack Exchange websites rank well and they allowed myself and others to provide better answers than they had previously. This leads to more developers being exposed to safer, cleaner ways to solve problems. Which means less terrible code being written from following terrible SO answers and tutorials.

And now things are a lot better. There's still obviously work that needs to be done, but:

    - The ecosystem (i.e. tutorials) is improving
    - The language is improving drastically
    - The community is pushing towards better practices
    - Framework developers are taking security seriously
A lot of people don't like how PHP used to be, including most of the people who put time and energy into making it better. You're not alone.

P.S. If you like the direction things are headed, help us make 7.1 even better:

* https://wiki.php.net/rfc/mcrypt-viking-funeral

* https://wiki.php.net/rfc/libsodium

* https://wiki.php.net/rfc/php71-crypto

comment 10y ago · link · parent

Why is that a sad thought?

1723.

Show HN: Side-Channel Resistant Base64, Base32, Hex Encoding (PHP)(github.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

Why link to a fork that's 5 commits behind master?

1725.

Show HN: Halite – A simple libsodium wrapper for PHP projects(github.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

I can almost guarantee their response will be, "WTF? Stop making words up, mate."

comment 10y ago · link · parent

And if you have a good block cipher you can build a hash function.

Encryption is a reversible, keyed transformation of a message. If you cannot reverse it, it is not encryption. Calling it encryption just introduces confusion.

comment 10y ago · link · parent

> One way encryption is a mathematical function that takes a variable-length input string and converts it into a fixed-length binary sequence.

So, a hash function and not encryption? Got it.

Sarcasm aside, we really need to start using the correct terms.

https://paragonie.com/blog/2015/08/you-wouldnt-base64-a-pass...

    Cryptography
    ||\
    | \`- Hash Functions
    |  `- Secret-Key Cryptography
    |    |\
    |     \`- Secret-Key Encryption
    |      `- Secret-Key Authentication
     \
      \
       `- Public-Key Cryptography
         |\
          \`- Public-Key Encryption
           `- Public-Key Authentication
Hashing is NOT encryption.

comment 10y ago · link · parent

https://github.com/nylira/prism-break/issues/249#issuecommen...

https://www.reddit.com/r/australia/comments/32hexp/a_secret_...

Don't use Wickr.

Proprietary crypto + an interesting target for NSA because of its popularity among ISIS = probably snake oil and at the very least makes you a target

"Career criminals recommend it" isn't a good indicator of security. Two things to consider:

1. Confidential informants exist

2. Being a high-risk individual doesn't make you a domain expert

Ask your drug dealers to explain why RSA encryption with PKCS1v1.5 padding is bad. If they can't, disregard their opinion on cryptography and privacy technology.

1730.

Show HN: Side-Channel Resistant Base64, Base32, Hex Encoding (PHP)(github.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

What tool to use is a decision that developers and companies have to make for themselves. I can't make it for them, so I usually don't try.

Exception: Don't use mcrypt. It's abandonware.

comment 10y ago · link · parent

This is an excellent write-up.

In case anyone is concerned, this bears repeating: This attack broke CodeIgniter 2's poorly designed Encrypt class, but CodeIgniter 3's Encryption class offers authenticated encryption.

If you're still using CodeIgniter 2, upgrade.

If you're using CodeIgniter 3, make sure you're not using Encrypt.

comment 10y ago · link · parent

Usually some variant of: The PDF file contains binary data somewhere within it that will cause a particular PDF reader to misallocate memory. Because data and code are jammed next to each other when you run a program, a clever memory misallocation can be used to rewrite the program (the PDF reader) as it executes in order to execute whatever malicious commands the author of said PDF file intends.

The typical defenses against these attacks include:

* Exploit mitigation tools, such as EMET

* Writing applications to be more memory-safe

* Various other tactics, many of them disingenuous.

comment 10y ago · link · parent

It's a little weird, but you'll get used to it.

Caddy looks great, and I might end up using it for my next project. If I do, and I make money off it, consider at least one sponsorship secured. :)

comment 10y ago · link · parent

OK, so put a ring on it.

And by ring, I of course mean HMAC.

comment 10y ago · link · parent

Went through the SQL injection demo, and it recommends parametrized queries. Excellent.

EDIT:

Joined with Github, went through the password handling section, then saw this:

http://i.imgur.com/H4h5FUY.png

No no no no NO! Do NOT use SHA256 for passwords.

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

https://codahale.com/how-to-safely-store-a-password/

PBKDF2-SHA256 with 100k or more iterations? Okay, fine.

SHA256 the cryptographic hash function not designed for password storage? Bad advice.

comment 10y ago · link · parent

> You'd have to have a real vendetta against someone to value ruining their life at $15k.

You're thinking about it wrong. There is no opportunity cost in their worldview, just lulz to be had at the expense of people they deem worthy of ruination.

(I never said the people that live in the intersection of trolls and blackhats are great at financial or career planning, after all.)

comment 10y ago · link · parent

Your comments make sense in the real world, where the big threat is "criminal enterprise looking to make an illicit buck".

I worry that people are too obsessed about the hypothetical specter of tremendously skilled and bored black-hats who will ruin lives for fun, rather than for a pay-off, e.g. ZF0.

comment 10y ago · link · parent

Healthy tissue will metabolize ketone bodies instead of glucose, so a ketogenic diet shouldn't be affected by their observation.
1
5657585960