HNHacker News
TopNewBestAskShowJobs

loup-vaillant

10,104 karma · joined July 1, 2009

http://www.loup-vaillant.fr

https://monocypher.org

https://elligator.org

submissionscomments
loup-vaillant··on Hardware Attestation as Monopoly Enabler
> (If it hasn't been done already, an AI-generated short film of it would be a great idea...)

Once you have the script, that’s a couple actors in a classroom, a couple e-ink readers for props, the film crew… It can be shot with less than 10 people in a day, then one person for a couple days for cutting and post production. And that’s on the very high end for this scene.

Considering the reach this video would meant to have, avoiding AI would not be that expensive.

loup-vaillant··on Hardware Attestation as Monopoly Enabler
> Passkeys absolutely do not need TPM.

They do not, but how does the service you’re using know your passkey is secure? For all they know you’re just some gullible user that clicks through every fishing email you get. You’re dumb, weak, helpless, they gotta protect you from this scary world out there, and maybe yourself as well.

They can’t do that if they allow your passkey to be stored anywhere you control. KeepassXC? The second you type in your master password the keylogger will snatch it, and your entire database with it!

Okay, maybe you’re some hot shot cryptographer, you’re using a TKey (think Yubikey, except you have full control), and there’s no way your secret key leaves it even if your main computer is fully compromised. Well, the service doesn’t know that. All they see is your public key and a matching signature.

So, sorry Mr. Security Researcher, we’re gonna have to be safe, and require you to use approved hardware only. Too many (wo)men children out there must be protected, we have no way to tell you’re not one of them, so it’s remote attestation or you’re out. What’ online buying worth for anyway, when you can just cross the ocean?

---

Just so we’re clear, I agree with you here. But don’t forget there are two kinds of passkeys out there: with or without the evil remote attestation. And many companies will push for the remotely attested kind, using the exact argument I used above, except with a straight face.

Or they will just present a false dichotomy: remotely attested passkeys on the one hand, short easy to guess reused everywhere passwords on the other.

loup-vaillant··on Hardware Attestation as Monopoly Enabler
> TPMs are great.

TPMs are a fucking mess. TPM 2 at least, I’ve worked with it for a few months. I love me some hardware security module, but I want to control it. And if it must be a standard, please please to something like the TKey, so it can be both much simpler than current ad-hoc standards and future proof.

https://loup-vaillant.fr/articles/hsm-done-right

loup-vaillant··on Hardware Attestation as Monopoly Enabler
> You don't have to compromise anything.

So… I don’t have to compromise the ability to run any program I want on my machine, and I don’t have to compromise the ability to be root on my machine. Right? And of course, when I say "me", I’m talking about everyone, including cheaters. Meaning, we don’t have to compromise the cheater’s ability to run any program they want (that would include cheats), nor their ability to be root on their machine.

> In fact it is optimal to have the system be as secure as possible that way cheats can't mess with the game.

Secure for the game company you mean. I want a computer that’s secure for me, that responds to my commands. And again, "me" includes everyone and cheaters too.

---

The online gaming industry is not worth sacrificing individual ownership of computers.

loup-vaillant··on Hardware Attestation as Monopoly Enabler
The problem is not that the OS can’t attest the app is secure. The problem with cheating is that the game servers cannot attest the client is genuine in all aspects that matter: non-modified client, running in an environment where there is no inspection of its memory for map hacks, aim bots, and more. The only way to do that is a remote attestation of the entire chain: hardware, locked down OS, app. (If the OS isn’t locked down it can’t prevent the player from running cheating software.)

The choice is simple: tolerate some level of online cheating, or require remote attestation to run the game. If you ask me, I’d rather take the first option. Locked down game console already make me a bit queasy. A locked down desktop, laptop, or palmtop? That’s not acceptable. People should be able to run any program they want on their computers. If that means the end of online gaming, so be it.

loup-vaillant··on Hardware Attestation as Monopoly Enabler
> these developments still fill me with a terrible sadness.

I wish they filled you with anger instead. It’s not too late. You’re not alone.

loup-vaillant··on All phones sold in the EU to have replaceable batteries from 2027
I'm not sure they're complying even with the letter of the law. Many cookie banners I see, require several clicks to deny anything but those they don't have to ask me about. And in most other cases, the accept button is significantly more visible than the deny one.

If that's actually allowed, yeah, bad law. If it's not… well I guess we can hope prosecutors will prosecute. Though I'm afraid we won't get much more than hope…

loup-vaillant··on All phones sold in the EU to have replaceable batteries from 2027
> I don't think we're going to start seeing most people keep their phones for 7-10 years.

I do. I lasted more than 15 years on 2 phones, and the only reason I'm at my fourth right now, is because the third was stolen after 3 months of use. I'm hoping its replacement, a used phone already, will last at least 5 years. Regardless, my next upgrade will not be a choice. I will milk my current phone until I am forced to change, as I always do.

loup-vaillant··on All phones sold in the EU to have replaceable batteries from 2027
> this law will force phone manufacturers to compromise the things that most people want in order to provide something that most people don't want.

Okay, you're claiming two things: (i) replaceable batteries will compromise some other features, and (ii) most people want those features more than they want a replaceable battery.

Can you name 3 of those features? I personally can't.

loup-vaillant··on Convincing Is Not Persuading
Simply put, they don't get it.
loup-vaillant··on Bindless Oriented Graphics Programming
> What you get by using Unity or Unreal Engine is that a big team already worked through all this overhead.

Obviously, given the low-level subject matter, this post wasn't aimed at turnkey engine users. In fact, people interested in this stuff are probably actively trying to be independent of those engines.

I will add that we probably need more people able to implement rendering engines. Having to chose between two corporate giants and suboptimal engines isn't ideal, neither for developers nor for players.

loup-vaillant··on France targets Australia-style social media ban for children next year
I've heard just today of England trying to hit messaging apps with mandatory image scans — ostensibly to avoid the transmission of unsolicited dick pics, which more than one teenage girl have been the target of, but in practice may have far reaching consequences.

https://www.youtube.com/watch?v=Y893SFA0iOk

I am at the point where I'm watching out for messaging apps breaking actual end-to-end encryption (sending data based on local scans definitely applies there, even if the data is just sending a red flag once in a blue moon). And you can bet the second that happens, I'm out. One last message to all my contacts to tell them, and that's it.

And if things get real bad, like, actual private communications become illegal, I know ways to get around that: https://elligator.org/

loup-vaillant··on France targets Australia-style social media ban for children next year
Here's the thing though: they're not killing entertainment — at least not in general. They're killing communication.
loup-vaillant··on A Vulnerability in Libsodium
Do note thought that X25519 and Ed25519 were designed so they wouldn’t need those checks at all. It’s only when you’re trying to design fancier protocols on top of Curve25519 or Edwards25519 that you can run into subgroup issues.

And for those use cases, I personally try my best to just reproject everything back into the prime order subgroup whenever possible. Monocypher has a number of such fancy functions:

  crypto_x25519_dirty_fast()
  crypto_x25519_dirty_small()
  crypto_elligator_map()
  crypto_elligator_rev()
  crypto_elligator_key_pair()
The dirty functions explicitly produce public keys that cover the entire curve, so that random such keys are truly indistinguishable from random when converted with `crypto_elligator_rev()`. But instead of just removing the clamp operation, I instead add random low-order point, so that when we later use the point in an X25519 key exchange, the shared secret is exactly the same as it would have been for a genuine X255119 key.

That’s where I thank DJB for designing a key exchange protocol that project the shared secret to the prime order subgroup, even when the public key it processes is not. The original intent may have been to make checks easier (low order keys all end up yielding zero), but a nice side effect is how it enabled a nice API for Mike Hamburg’s Elligator2.

> Accepting points outside the prime-order subgroup can quietly undermine higher-level assumptions, even if no immediate exploit is obvious.

If on the other hand we can prove that all computed results are low-order-component-independent (as is the case for X25519), then we know for sure we’re safe. In the end, Ristretto is only really needed when we can’t tweak the protocol to safely reproject to the prime order subgroup.

Don’t get me wrong, having a prime order group abstraction does help. But if someone is qualified to design a protocol that may require this, they’re qualified to try and make it work with a non-trivial cofactor as well — that, or prove it cannot be done.

loup-vaillant··on No Graphics API
There’s a simple (but radical) solution that would force GPU vendors to settle on a common, stable ISA: forbid hardware vendors to distribute software. In practice, stop at the border hardware that comes from vendors who still distribute software.

That simple. Now to sell a GPU, the only way is to make an ISA so simple even third parties can make good drivers for it. And the first successful ISA will then force everyone else to implement the same ISA, so the same drivers will work for everyone.

Oh, one other thing that has to go away: patents must no longer apply to ISAs. That way, anyone who wants to make and sell x86, ARM, or whatever GPU ISA that emerges, legally can. No more discussion about which instruction set is open or not, they all just are.

Not that the US would ever want to submit Intel to such a brutal competition.

loup-vaillant··on The past was not that cute
> Which is why most people seek — by your own admission — officials to lord over them instead.

I don’t recall saying that. On the contrary, I believe people are forced to let officials rule over them, in part by lack of time and other resources, but also in a big part because they believe their government is democratic, even when it is increasingly not.

To give a couple examples in France: in 2005 about 60% of French people voted against the Treaty establishing a Constitution for Europe, despite predictions to the contrary by mass media, and overwhelming representative support. It wasn’t just defiance, there were quite a few objections to the text itself. Then a relatively short while later, a functionally identical text was voted by the parliament. That was the first time I realised my country was no longer, if ever, a democracy. Then over time we had unpopular reforms over unpopular reforms, culminating retirement reform, which all indicators show like about 70% of the population was against. All passed. Not long before that there was a popular demand for citizen initiated binding referendums. Ignored.

The people there did more than discuss in their private homes and answered surveys. We voted. We protested, down in the streets. The state answered with increasing violence. Documented repression tactics, turning a blind eye to police misconduct… A real shame in what was supposed to be the country of Human Rights — that too, we are no longer.

So yeah, politics takes time and effort. But it goes beyond that: work is inequitably spread, split between working overtime for relatively little benefit, and utter unemployment. (The split isn’t all that clear cut, I myself work 4 days a week, because I can afford the pay cut.) And on top of that, peaceful protests now put us in increasing physical danger. People lose their hands, their eyes, and in some (thankfully still rare) cases their lives.

No wonder so many people chose to just disengage at this point.

> But most people are not so fortunate, so they do not find it fair that, for all realistic purposes, only some people get to participate in democracy to their own advantage. Hence why democracies devolve into a system of officials instead, with most people believing it offers a better balance for all involved, albeit at the cost of losing say.

I believe this is false, as a matter of historical fact. At least in France. When we had our Bourgeois Revolution (sure the people were starved and all, but it was coopted quite quickly), there were discussions about whether we should have democracy, or a representative government. Note the wording: "representative democracy" would have been a ridiculous oxymoron at the time. Anyway, democracy was shut down, in big part because the bourgeois discussing this decided that the people couldn’t steer themselves. Nevermind the Paris Commune, who did steer themselves for a very short while, but never got the chance to prove itself — the army disbanded them with bullets, over 10,000 killed.

Another example are randomly sampled assemblies. Constituent assemblies, or assemblies with a specific purpose. When analysed after the fact we generally find that their decisions are pretty well reasoned, well grounded, well documented, and (shocker), serve the actual interests of the people — of course they would be, since the members would then go on being subject to their own decisions.

loup-vaillant··on The past was not that cute
> When the government has access to unlimited labour and military via robots, why do they need citizens anymore?

Wait a minute, didn’t you just assume Western countries are not democracies?

I’ve noticed how fashionable it is in the US in particular, to distrust the government — not just this government, but on principle. This idea that a government never acts on behalf of the people, unless forced to. I wouldn’t disagree to be honest. But then we need to follow this up to its logical conclusion: governance by elected officials is not democratic.

Then we need to decide if we actually want democracy or not. Personally, I’d like this decision to be… err… you know, it would be nice if everyone had a say?

loup-vaillant··on The past was not that cute
It is also on track to be nearly as… impactful as the Permian extinction. That stuff cuts both ways unfortunately.
loup-vaillant··on EU Council approves Chat Control mandate for negotiation with Parliament
> of course, however big a problem chat control is, climate change is a much bigger issue

Not quite "of course" in my opinion. An even bigger problem than (and a major cause of) climate change is how information flows to people. Or how it does not flow. Private conversations are part of that flow, I wouldn’t take that lightly.

loup-vaillant··on Giving C a superpower: custom header file (safe_c.h)
> I'm baffled as to why you would want to use macros to emulate c++.

I like the power of destructors (auto cleanup) and templates (generic containers). But I also want a language that I can parse. Like, at all.

C is pretty easy to parse. Quite a few annoying corner cases, some context sensitive stuff, but still pretty workable. C++ on the other hand? It’s mostly pick a frontend or the highway.

loup-vaillant··on You Need Subtyping
Wait, if I recall correctly, covariance has long been established as a mistake. I would guess that if TypeScript had adopted contravariance the problems you mention would go away. We could then argue that TypeScript does need subtyping (like everyone else), as long as it’s contravariant.

My point is, we can’t say TypeScript doesn’t need subtyping just because they botched it. As such, it may not be a good counter example of the article’s thesis.

loup-vaillant··on Hell is overconfident developers writing encryption code
As was said above, don't just add a number from 1 to 6. You want your ciphertext to be indistinguishable from random, so in this case (assuming only letters and no punctuation nor space), you need to add a number from 0 to 26. And you need a uniform distribution, or again, statistical analysis will screw you.

Now one does not simply generate a uniform random distribution from a d6. You can't throw the die 5 times and add the results for instance. First, you'll get a number between 5 and 30. Not only the range falls short one letter (25 possibilities instead of 26), what you get is a binomial distribution, heavily skewed towards the middle numbers (5 and 30 are very improbable in comparison).

My recommendation here would be to throw the die once, subtract 1, multiply by 6, throw it a second time, add it, subtract 1. This will give you a uniform distribution between 0 and 35 (assuming your die is perfectly fair, which, spoiler alert, it isn't). Think of it of a 2-digit base 6 number. Assign a number to each letter of the alphabet (and now you can even support spaces & punctuations, or numbers), add (modulo 35) the result of your die throw, do not translate the result to an encoding with less than 36 symbols, and now you have a proper one time pad.

One thing that's crucial when attempting anything cryptographic: make sure you've got the maths down. Ideally you should be able to construct a rigorous (even machine verified) proof that your stuff works as intended. For the one time pad it's relatively easy. But you need to do it, that's how you'll notice that if you encrypt "aaaaaaaaa" your result will only yield letters between B and G, which you'll agree doesn't hide your plaintext nearly as well as you intended.

loup-vaillant··on Hell is overconfident developers writing encryption code
Foreign function interfaces aren't that scary. Any competent $lang developer ought to be able to read the docs and roll their own wrapper.
loup-vaillant··on The history of twisted-pair Ethernet [video]
Dammit, the video doesn’t explain why we have 4 twisted pairs in our cables instead of just 2! One for Rx, one for Tx, but then why did they keep the other two? Surely they didn’t have 4 dead wires just because of legacy? So why the additional pairs, what were they used for?
loup-vaillant··on Unless my phone can be a PC, I don't want to keep paying for extra performance
I don’t. 2GB ought to be enough for everyone. The only reason it may not is if apps are ludicrously memory hungry.
loup-vaillant··on Unless my phone can be a PC, I don't want to keep paying for extra performance
Then the malware is hiding in the system space, which for some reason takes over 70% of all my available memory.

I’ve heard that as systems update, they keep the old stuff around until you run out of memory. I haven’t checked, and I have yet to reset my phone to factory setting, but if that’s what’s really happening, that’s still unacceptable.

One reason for low memory being responsible for slow loading times, is on the fly (de)compression, to save what little memory the phone has left.

loup-vaillant··on Unless my phone can be a PC, I don't want to keep paying for extra performance
> When was the last time you felt your smartphone really couldn’t cope?

Every day since a couple years now.

> I struggle to recall the last time an app jerked and juddered into life.

I don’t. But here’s the thing: it wasn’t that way at first. It’s just that over time my phone just slowed down. Purging it of its data and unused software did nothing, I just had less and less available memory over time, and maps grew slower and slower, and it was becoming increasingly impossible to open several, sometimes just two applications at the same time.

---

That being said, I do agree with the core point of the article: phones are plenty fast enough.

Heck, I’m pretty sure a snappy modern UI with all the bells and whistles except perhaps a voice assistant requires less than a tenth of the computing power of the average phone. We just need reasonably performing software. Not crazy optimised software, just something that makes decent use of the CPU and GPU, and doesn’t consume too much RAM.

But the market won’t even give us that. You know what, keep that up a few years and I’ll seriously think of switching back to a flip phone.

---

Edit: I have a Xiaomi M1804C3CG.

loup-vaillant··on Handwriting but not typewriting leads to widespread connectivity in brain
My SO is left handed, and here’s her trick: slant the paper.

If you write with the same positioning we teach to right handers, the hand hides the writing, and if you use a fountain pen you just smear the writing before it has a chance to dry. So don’t: slant the paper, like 45 degrees counter clockwise, and position your hand above the line you’re writing. Somewhat. I’m not the leftie, I’m working from memory here.

The key idea is to keep the text visible, and keep the writing position relatively comfortable. Then it’s just down to training. Target a specific style, draw individual letters… write stuff while concentrating on the writing, not whatever you need the writing for (you can’t really practice and take notes for instance).

Mostly boring advice, that apart from slanting the paper probably applies to everyone. (Note: I also have terrible hand writing, grain of salt and all that.)

loup-vaillant··on The Crime Messenger
> This was the basis for users to think the system was secure? Seriously!?!

Charisma and similar flavours of "trust me bro" works more than reasonable people would anticipate. See every pseudo science and conspiracy theory ever. Cryptography is no exception.

loup-vaillant··on The Crime Messenger
How any group of one thousand people could be truly safe? Of course they would get infiltrated. Groups who want to survive being hunted kinda have to either be smaller, or divide themselves into cells.
← PreviousPage 3 of 34Next →