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

If you're open to changing the protocol, might I also recommend XChaCha20-Poly1305? :)

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

It's fast and constant-time even on mobile devices (where AES is often variable-time or slow due to a lack of AES-NI).

comment 6y ago · link · parent

That's very cool to hear!

comment 6y ago · link · parent

I appreciate the context. It's probably wise to abandon Signal interop.

My reasoning here is: Moxie isn't ever going to acquiesce on the points he's stubborn about, and Olm/Megolm could otherwise be a great cryptographic design with or without his approval.

> What don't you like about the variable names at https://gitlab.matrix.org/matrix-org/olm/-/blob/930c4677547e... ?

Confusion between ciphertext on line 85 and output on line 89 made me have to reread the function twice to figure out what was going on.

comment 6y ago · link · parent

Ah, I they see they're using libolm, as is the Matrix project!

I have a number of critiques of libolm that I haven't developed into a practical attack, but are simple enough to fix (if you ignore the massive legacy support and backwards compatibility t̵r̵a̵p̵ ̵t̵h̵e̵y̵'̵v̵e̵ ̵s̵e̵t̵ ̵f̵o̵r̵ ̵t̵h̵e̵m̵s̵e̵l̵v̵e̵s̵ EDIT: see Arathorn's comment below).

Libolm is encrypting with AES-CBC [1]. In addition to side-stepping entire classes of attack (i.e. padding oracles), CTR would allow better performance: You can parallelize both encryption and decryption with CTR mode. With CBC mode, you can only parallelize decryption (but not encryption) since the IV for all but the first block is the previous block of ciphertext, which means you'll know the correct IV when decrypting but not when encrypting (since you have to calculate it sequentially).

Yes, they HMAC the ciphertext [2]. However, their variable name choice doesn't inspire confidence in its correctness.

Furthermore, they truncate the HMAC to 8 byes and attempt to justify the truncation by appending an Ed25519 signature, but that sort of configuration is just begging for a confused deputy scenario, like an old iMessage vulnerability [3]. It's no where near as bad (iMessage eschewed MACs entirely, this still uses a MAC, so it's not exploitable), but it's something that probably would make anyone working in cryptography (and any adjacent fields) give a confused puppy head tilt when they read it.

Regarding their ratcheting protocol [4]: Instead of feeding HMAC-SHA256 back into itself at each ratchet step, I'd feel way more comfortable if the protocol did HMAC-SHA512 and used one half of the output to derive encryption/authentication keys and the other half the ratcheting-forward key (instead of one HMAC-SHA256 for both purposes).

Using two distinct 256-bit secrets (even if they're generated from the same input at i=0) instead of reusing a secret strengthens the forward secrecy of the entire protocol.

HMAC-SHA256: One ring to rule them all (at any given ratchet step).

HMAC-SHA512-split: If you (against all odds) guess one of the keys, that doesn't give you the ratchet-forward key too, since they're two distinct keys (albeit generated deterministically from the same input).

Nothing I said above is exploitable, otherwise I'd be emailing their security team instead of posting on HN. :)

That being said, if the Libolm devs want to shore up the security of their protocol in a future revision, the following changes would go a long way:

1. Use HMAC-SHA-512 and split it in half for the ratcheting step of Olm/Megolm

2. Use AES-CTR instead of AES-CBC

3. Stop truncating MACs

[1]: https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/me...

[2]: https://gitlab.matrix.org/matrix-org/olm/-/blob/930c4677547e...

[3]: https://blog.cryptographyengineering.com/2016/03/21/attack-o...

[4]: https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/me...

comment 6y ago · link · parent

> This happened to me with Bullhorn and Intuit, despite my investigation and reports being unrelated to my employment.

I should probably have added, before that comma, "threatening my employer".

comment 6y ago · link · parent

> Meanwhile, for any target an independent researcher can lawfully assess, the researcher retains the ability to ignore the bounty program and publish straight to Twitter.

I've had vuln disclosures go bad before and after the rise in popularity of bug bounty programs, so I'm probably qualified to chime in here.

Before HackerOne, the default for a company that didn't receive vuln reports well was to threaten you and/or your employer with lawsuits.

This happened to me with Bullhorn and Intuit, despite my investigation and reports being unrelated to my employment. They ultimately went no where, but I imagine the conversation I wasn't present for was, at best, awkward.

Last year, under one of my aliases, I found a vuln in Credit Karma, and the H1 triage staff declared it out of scope. So I posted it on Github/Twitter.

Instead of threatening to sue, CreditKarma asked me to pull the tweets/gists and walked back the H1 triage decision and ultimately awarded a bounty for my finding.

Thus, I don't buy the chilling effects narrative the article tries to sell. It actually made security research more normalized than it used to be.

Just my unsolicited $0.02

comment 6y ago · link · parent

Thanks Thomas!

comment 6y ago · link · parent

> end-to-end encrypted

O RLY?

https://git.jami.net/savoirfairelinux/ring-client-android/is...

https://security.stackexchange.com/a/171461/43688

I looked through their code to see where data is being encrypted/decrypted, and was unable to locate it.

Since their issue indicated they use 4096-bit RSA, I really wanted to see if they were vulnerable to Bleichenbacher's 1998 padding oracle attack.

https://git.jami.net/savoirfairelinux/ring-project/wikis/tec...

> The SHA-1 fingerprint (160-bits) of this public certificate is the JamiId.

this-is-fine.mp4

comment 6y ago · link · parent

> How many jobs can be done at home?

Infinite.

That's because the set of possible vocations is only bounded by human imagination. This results in an uncountable set, which would resolve to a value that approaches infinity.

A more insightful question is, "How many of the jobs that people hold today can be done at home?" 34% seems like a reasonable metric.

comment 6y ago · link · parent

> Is obfuscation a type of authorisation?

No.

And even if you tried to argue that, the exploit was public on exploit-db for years, and therefore the expected security from the broken obfuscation is zero bits; so in this case, it would not count.

More pertinent:

> Authentication Not required (Authentication is not required to exploit the vulnerability.)

comment 6y ago · link · parent

Why the hell are prime ministers using Zoom in the course of their civic duty?

Are they discussing national secrets over Zoom? Without end-to-end encryption?! That's some form of criminal negligence and/or mishandling of classified information in every jurisdiction I know.

If not, it's little more than a nuisance and a reminder that Zoom should not be relied on for important communications.

comment 6y ago · link · parent

I was too depressed and scared to consider that then.

I haven't really thought about that angle since, either.

comment 6y ago · link · parent

Technical countermeasures.

My proposal would require companies to actually take security very seriously.

https://www.troyhunt.com/we-take-security-seriously-otherwis...

comment 6y ago · link · parent

> Just because something is connected to the public internet doesn't mean that you can hack it.

I never said or implied that.

All I said is, because all of my conduct involved publicly accessible components of their web application, I never exceeded authorized access.

Which means that the CFAA's clause about "unauthorized access" in particular does not apply, since none of my packets exceeded or bypassed an authentication or authorization control on their web app.

> Most homes are accessible from public roads, that doesn't mean you are allowed to climb through any open window that you see.

A better analogy is knocking on someone's door, only to discover it swings open, then walking away. And then getting charged with breaking and entering for their failure to shut their door, and then paying for damages for leaving a muddy footprint on their exterior welcome mat.

> You used a vulnerability to hack into some server associated with the FBI, I don't see any ambiguity here.

I won't argue that I'm fully without blame.

The mistake I made during all of this was, upon discovering they were running an outdated version of DotNetNuke (right click > view source; not exactly something I had to go out of my way to detect), I panicked. And to assuage my own anxiety, I tested the file upload to confirm that it was real.

That was the mistake that let them prosecute me at all. And it's a mistake I have learned from:

In the years since, I have never sent a packet with security implications to another network even for projects with a public bug bounty. I constrained myself henceforth to reviewing source code and reverse engineering, since that doesn't involve sending packets over a network and invoking a law that was written before the concept of a public network existed. (And that law being problematic is my entire point in this discussion, not appealing for amnesty in the opinions of HN users. Anyone who decides to hate me won't be the first.)

Even if I knew not to do that then, I still would have informed them of their vulnerability as soon as it was discovered. Because that was the right thing to do.

comment 6y ago · link · parent

> Generally speaking, federal crimes rarely ever turn up on a standard background check.

This also happened in the state of Florida, which has very open records.

comment 6y ago · link · parent

> Who charged you?

Sylint pressed the charges through the FBI.

Originally, they also insisted I caused damage days before the date of incident and tried to tack on $32k in damages. I pointed out that I do not possess a time machine, and they shifted it from (June 18-24) to (June 21-27) and lowered the dollar amount to $9k.

comment 6y ago · link · parent

> If you don't mind my asking, what part of your life is still messed up because of this?

Employment!

I tried to go the crypto consultant route in recent years and was told by many people via Twitter/Reddit private message that they can't or won't go with the company I helped start simply because of my criminal background.

I spent most of last year job-searching. I interviewed well, but many companies rescinded offers after my background check concluded, even when I told them about this incident up front.

In 2011, everyone joked that I'd be fine. "The government will probably follow up with a job offer," they insisted. Instead, I was rendered unemployable by most of the companies that desire the skills I possess.

The silver lining is that some companies restrict their background checks to a time-gate, which means it's not totally impossible to make a living. But they're the minority.

> Is it directly related to the charges or is it the outcome of spending time behind bars?

My sentence was probation and a short duration of house arrest, community service, and paying Sylint $9,370 (which, at barely above minimum wage, took a few years). My probation was terminated early for good behavior.

The problem has less to do with the courts and more to do with background checks.

People make mistakes. Especially young people. (I was 21 when this happened.)

Learning itself is a messy process that often requires making mistakes to be successful.

Punishing someone in perpetuity for having not lived a perfect life is a problem that society hasn't yet solved.

We have hacks ("Right to be Forgotten") to try to alleviate some of the symptoms, but with the advent of the Internet, there is now a public, immutable record of your most embarrassing fuck-ups. And I don't think we were ready for that.

comment 6y ago · link · parent

The onus should be on the service operators to clearly define what's authorized and what isn't; and if they miss something, the liability should be borne by the service operator, not the person who found their gap.

comment 6y ago · link · parent

> I suspect the definition of 'unauthorized access' will need to be more clearly defined

I've been saying this for years! For reasons unrelated to TOS rulings, too.

A little bit of background...

In 2011, I was charged with unauthorized access to a protected computer. The website in question (Infragard Tampa Bay, run by the FBI through a company called Sylint) was running an older version of DotNetNuke that had a 2008 vulnerability.

The nature of the vulnerability was as follows: If you accessed a specific URL which required no authorization, you could upload files to the server and presumably execute them. (I say presumably, because I didn't.)

I wanted to fight the charge because I never exceeded "authorized access" by using a publicly accessible web form on the public Internet, and the CFAA's terms were vague.

* The website was publicly accessible, without needing authorization

* The file upload form was publicly accessible, without needing authorization

* The folder that files were uploaded to was publicly accessible, without needing authorization

* All of my conduct was authorized by the software they ran on the public Internet, and therefore the unauthorized access I was accused of never actually occurred

My overworked public defender didn't have any fight in him. The EFF wouldn't help either (the person I talked to didn't see the significance of this CFAA ambiguity for civil rights). I grew up in a poor family and couldn't afford legal counsel, so I ended up pleading guilty, which has totally fucked my life up ever since. (It really doesn't get better, even 8-9 years later.)

> since I know many cases in the past relied around users doing shit that was unauthorized by the TOS.

Good. I hope this becomes a precedent that frustrates prosecutors and helps defense cases in appeals court.

comment 6y ago · link · parent

The past few weeks is not a typical WFH experience.

1. A lot of folks are being forced into it, rather than it being an option chosen voluntarily.

2. School is cancelled, so kids are home, which can be very distracting for parents (which, for some industries, is a significant portion of employees).

At the intersection of the two observations, I'd caution against extrapolating too much from the recent pain points.

In my experience (I've worked remote for the past 6 years), I'm far more productive working from home than I am in an office.

comment 6y ago · link · parent

> Charter CEO Tom Rutledge last week told employees in a memo to keep coming to the office even if their jobs can be performed from home, because people "are more effective from the office."

1. Bullshit. Show us the data to substantiate your claim.

2. Even if we assume that Rutledge is correct: Is the delta in observable effectiveness worth the cost to employees' lives and their families?

I'm on the side of the engineer who resigned. The CEO's policy is stupid, irresponsible, and/or callous.

comment 6y ago · link · parent

That is the idea. They're saying that, in practice, the Authority is anti-freedom, and freedom is the enemy.

comment 6y ago · link · parent

Chelsea's pronouns are she/her.

comment 6y ago · link · parent

Power comes with responsibility that the powerless do not necessarily assume.

comment 6y ago · link · parent

I was using the Planet Venus as a historical precedent of what happens to a planet in our solar system in the conditions of a runaway greenhouse gas effect when I wrote that.

I'm a cryptography-focused security engineer, not a climate scientist.

comment 6y ago · link · parent

I don't believe we'll ever succeed in dealing with climate change. It's going to kill us all and the people in power will refuse to accept responsibility the whole while.

Happy to be proven wrong!

comment 6y ago · link · parent

> I just place no value on others being nice to me. I care much more about do they treat me with respect and decency? Are they honest?

Anyone who's been in The South for an appreciable length of time won't need to hear this, but it's totally possible to be "nice" while also being a jerk.

Respect and honesty go a long way towards productive conversations.

comment 6y ago · link · parent

> A nice person is one who tries to get you to like them. They want to be friendly and [amicable].

Most people who have ever talked to me in a professional setting would probably describe me as "nice".

I don't give two flying fucks if people like me. I'm not trying to be friendly or amicable.

I'm nice because I'm not weak.

I should elaborate.

There are a lot of shitty people in the world, and they come from all walks of life. Having grown up in a low-income family in a low-income area in Florida, I learned very quickly that the worst humans have one trait in common: They cannot help but confuse kindness for weakness.

Enter me. I'm a direct communicator. I will stand up for my beliefs and values. I will enforce my own personal boundaries, as well as anyone I'm working with, to the best of my ability. (e.g. Want to co-opt a meeting to drop something on a team member, without consulting them about their schedule? Hell no.)

I choose to be nice not because I want to benefit more from a transaction. I choose to be nice because it subverts the expectations of the shittiest humans while making life more pleasant everyone who's not shitty. Game theory 101.

> Every single person I've ever met has a dark side. You find it eventually. Watch out for the people that hide their dark side as long as possible. Or even worse, pretend they don't have one.

> No one is perfect. Everyone has anger, fear, sadness, shame, and a host of other negative qualities.

If someone is hiding their "dark" side--unless they're also something super terrible like a serial killer or sexual abuser--chances are they only do so because they've learned through painful experience to not be vulnerable. People can and will take advantage of them.

Which means: If you find someone who is "hiding" their "dark" side... they're actually showing you their own insecurity, and thus some of their dark side.

If they continue to hide it from you, maybe you're coming across as judgmental?

People are complicated. It costs nothing to just be nice.

comment 6y ago · link · parent

"It's a bear market. That means, pay us money to read more than the first paragraph." Pass.

comment 6y ago · link · parent

The Y2K bug, in the public imagination, was premised on code like this existing somewhere in our computers:

  const DATE_COMPUTERS_DID_NOT_EXIST = /* arbitrary */;
  
  /* snip */
  
  if (Date::now() < DATE_COMPUTERS_DID_NOT_EXIST) {
    Computer::selfDestruct();
  }
(See also: the Simpsons Y2K episode, which I think is a good representation of what many non-tech people believed would happen.)

I think it's a great lesson in the failings of the public imagination and should serve as a warning to not give into moral panics.

1
678
60