Live data from Hacker News

Rust at Scale: An Added Layer of Security for WhatsApp

engineering.fb.com

81–90 of 151 posts

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#81

Earlier quoted context omitted.

Every encryption is end to end if you're not picky about the ends, or metadata. Do you trust facebook (excuse me, meta) to not snoop on your messages, and to not share them with the "intelligence" agencies ?

This is not true. The IETF draft is explicit that E2EE means that the message cannot be read by any party other than the sender and the intended receiver. When companies like Meta claim they support E2EE, this is what they claim. There are no tricky semantics or legalese at play here.

> When companies like Meta claim they support E2EE, this is what they claim.

Well, that statement can only resolve to true.

These requests of data collection are perfectly legal. FBI DITU gives an order: give me all chats from *@banana.com and they receive banana.com.

From there, two choices from the perspective of a tech provider:

a) You accept. You get paid.

    You can always claim you had been coerced / are a victim, and that everything has been done by the law.
b) You refuse. It's a crime.

    You take the risk to lose over 250K per day (!) in fines, some other court scandals that will come to you, some shady private stuff (what if we learn about your secret jacuzzi ?), harassement of the team, be publicly shamed that you supported terrorists who caused actual death of Americans, etc.

    In addition, nobody will know that you are the privacy hero and you are not even sure that the data is not exfiltrated another way.

To this day, Apple, Facebook, Google still deny participating in illegal requests. They claim these were lawful requests, that have been carefully looked one-by-one.

Yes, we looked carefully and decided we won't enjoy losing 100M USD and go to jail.

The trick is that the identifier / wildcard can be very vague and wide. Or there can be multiple of them, each of them are narrow, but put one of top of the other they are super wide.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#82
post #12

> Two major hurdles were the initial binary size increase due to bringing in the Rust standard library [...]. They don't say what they did about it, do they? Did they just accept it?

We invested a lot into build system optimizations to bring this number down over time, although we did accept on the order of 200 KiB size overhead initially for the stdlib. We initially launched using a Gradle + CMake + Cargo with static linking of the stdlib and some basic linker optimizations. Transitioning WhatsApp Android to Buck2 has helped tremendously to bring the size down, for instance by improving LTO and getting the latest clang toolchain optimizations. Buck2 also hugely improved build times.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#83
post #71

Earlier quoted context omitted.

What one should do about this? I mean, beside working on lowering that number. (Asking as a European who quite stubbornly refuses to install it - there are dozens of us. Dozens!) Edit: please don't participate in making WhatsApp even more inescapable as it is today.

Make your customer support on whatsapp. "Drop us a message to change your order". Allow ordering/enquiries over whatsapp. Send 2 factor verification pins over whatsapp - it is more reliable than SMS and generally there is a better 1:1 mapping between whatsapp accounts and real humans than phone numbers, so it is a good anti-spam or good way to distribute "first month free" type deals whilst keeping abuse low. Obvious…

[dead]

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#84
post #71

Earlier quoted context omitted.

What one should do about this? I mean, beside working on lowering that number. (Asking as a European who quite stubbornly refuses to install it - there are dozens of us. Dozens!) Edit: please don't participate in making WhatsApp even more inescapable as it is today.

I guess if you want to lower that number, you'd need to build something better, in some way. Answered as another European who've had Whatsapp forever, as some stubborn people refuse to move away from it, and also bunch of businesses use it.

Network effect is killer. "better" would include having more than 3 billion people already on it.

Maybe the EU or China will crack down on it. A single company shouldn't decide who gets to talk to half the world. If that company is American they will not tolerate it for long.

Personally DeltaChat is my new favorite Thing but it falls afoul of Zooko's Triangle - A WhatsApp number or POTS number is short because it's centrally controlled and you have to pay for each one. DeltaChat has public keys, so I have 20 of them, and nobody can control who gets one, but they're incredibly long... the QR codes are nightmares.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#85

The hardest part of a rewrite like this is usually maintaining bug-for-bug compatibility with the legacy parser rather than the actual Rust implementation. Most real-world media files are malformed in some way that the C++ code implicitly handled, so if you write a strict parser you end up breaking valid user data. Differential fuzzing seems like the only practical way to map that behavior without manually reviewing…

AI reply?

Not AI. Anyway, the real issue is permissiveness vs strict parsing—real-world files are messy.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#86

Earlier quoted context omitted.

I guess if you want to lower that number, you'd need to build something better, in some way. Answered as another European who've had Whatsapp forever, as some stubborn people refuse to move away from it, and also bunch of businesses use it.

Network effect is killer. "better" would include having more than 3 billion people already on it. Maybe the EU or China will crack down on it. A single company shouldn't decide who gets to talk to half the world. If that company is American they will not tolerate it for long. Personally DeltaChat is my new favorite Thing but it falls afoul of Zooko's Triangle - A WhatsApp number or POTS number is short because it's c…

> Network effect is killer. "better" would include having more than 3 billion people already on it.

At one point people moved from something else to Whatsapp, and that happened before Whatsapp had 3 billion people on it. If it's good, early adopters will adopt it and want others to adopt it too, then it snowballs from there.

It has happened before, and as long as new regulation doesn't solidify Whatsapp/FB in their position, it can happen again :)

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#87
post #80
post #71

Earlier quoted context omitted.

What one should do about this? I mean, beside working on lowering that number. (Asking as a European who quite stubbornly refuses to install it - there are dozens of us. Dozens!) Edit: please don't participate in making WhatsApp even more inescapable as it is today.

As a developer, I tried building an app that needs to use Whatsapp for communication. Unfortunately my phone number got blocked by the second test message. No Spam. Not marketing, just a test message to my own number. Along with it, they blocked my entire business, my LLC, and anything tied to it. I have been trying to get hold of anyone or anything at Whatsapp. I've spent 6 months trying to navigate the bureaucracy.…

Telegram API is easier to handle as far as I know if that can somehow help (in case you want live ChatGPT or notifications for yourself in a mobile chat)

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#88
post #52

> We believe that this is the largest rollout globally of any library written in Rust. I think that crown currently goes to https://github.com/googlefonts/fontations which is included in Chromium, not sure if it's on all platforms yet. Moreover, the translative dependencies of Fontations (click through https://crates.io/crates/fontations/0.3.0/dependencies ) should have an even (slightly) larger install-base. EDIT: f…

Just for reference, Wamedia ships on the major Meta apps and on iOS, Android, Desktop, and Web platforms.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#89

Earlier quoted context omitted.

WhatsApp could exfiltrate messages at the ends. But I assume the trick lies in the word "default". Didn't Skype also default to end-to-end encryption, unless there was a server flag that disabled it for that specific user (I might be fuzzy on the details)

I don't trust un-auditable client applications... If you want to assure me your e2e is secure, there must be at least two clients implemented by different people, with at least one of them opensource. Whatsapp used to have this, but lately they have cracked down on third party clients.

Even if they have, this doesn't prevent from turning on a feature flag, or push an experimental build to some users.

Re: Rust at Scale: An Added Layer of Security for WhatsApp

#90

Earlier quoted context omitted.

We really need an AI filter here on HN.

A comment like this works as well, let the community do its thing.

There are a couple of bots here.

Quoting a user:

    keeping it simple: a flat $15,000 to get you on the front page of Hacker News.
    [...] contact e-mail below
Expensive, but now with LLMs it's super cheap to do.

Spend a week to do a bot, get 10'000 USD of ARR for your B2B tech SaaS, and applause from your investors.

And a week is probably exaggerated, 2 days max

Post reply on HN