HNHacker News
TopNewBestAskShowJobs

btdmaster

1,711 karma · joined March 29, 2021

submissionscomments
btdmaster··on A cryptography engineer's perspective on quantum computing timelines
> Thus succeeding at making the telecommunications vendors used for Top Secret US national security data less secure, the obvious goal of the US National Security Agency, and the only reason they wouldn't use the better cryptography designed by Dr. Bernstein. /s

I guess the NSA thinks they're the only one that can target such a side channel, unlike, say, a foreign government, which doesn't have access to the US Internet backbone, doesn't have as good mathematicians or programmers (in NSA opinion), etc.

> Timing side channels don't matter to ephemeral ML-KEM key exchanges, by the way. It's really hard to implement ML-KEM wrong. It's way easier to implement ECDH wrong, and remember that in this hypothetical you need to compare to P-256, not X25519, because US regulation compliance is the premise.

Except for KyberSlash (I was surprised when I looked at the bug's code, it's written very optimistically wrt what the compiler would produce...)

So do you think vendors will write good code within the deadlines between now and... 2029? I wouldn't bet my state secrets on that...

btdmaster··on A cryptography engineer's perspective on quantum computing timelines
> “Doesn’t the NSA lie to break our encryption?” No, the NSA has never intentionally jeopardized US national security with a non-NOBUS backdoor, and there is no way for ML-KEM and ML-DSA to hide a NOBUS backdoor.

The most concrete issue for me, as highlighted by djb, is that when the NSA insists against hybrids, vendors like telecommunications companies will handwrite poor implementations of ML-KEM to save memory/CPU time etc. for their constrained hardware that will have stacks of timing side channels for the NSA to break. Meanwhile X25519 has standard implementations that don't have such issues already deployed, which the NSA presumably cannot break (without spending $millions per key with a hypothetical quantum attack, a lot more expensive than side channels).

btdmaster··on Show HN: Gecit – DPI bypass using eBPF sock_ops, no proxy or VPN
That's so cool.

This is interestingly very similar to domain fronting, except in this case the server doesn't need to work around it because it will still see the correct SNI.

Do DPI servers in your experience only check the first SNI packet for a given connection?

btdmaster··on Show HN: X86CSS – An x86 CPU emulator written in CSS
Very cool. The horsle demo made me think, how hard would it be to add a virtual memory address (or a non-8086 RAND instruction) that returns a random byte (that would allow it to pick a random value and get a standard wordle working in principle)

I see CSS random() is only supported by Safari, I wonder if there's some side channel that would work in Chrome specifically? (I guess timing the user input would work)

btdmaster··on Both GCC and Clang generate strange/inefficient code
It emits a cmp/jmp still when arithmetic would be fine though which is the difference highlighted in the article and examples in this thread. It's nice that it simplifies down to assembly, but the assembly is somewhat questionable (especially that xor eax eax branch target on the other side).
btdmaster··on Both GCC and Clang generate strange/inefficient code
I see yeah that makes sense. I wanted to highlight that "magic" will, on average, give the optimizer a harder time. Explicit offset loops like that are generally avoided in many C++ styles in favor of iterators.
btdmaster··on Both GCC and Clang generate strange/inefficient code
In my experience C++ abstractions give the optimizer a harder job and thus it generates worse code. In this case, different code is emitted by clang if you write a C version[0] versus C++ original[1].

Usually abstraction like this means that the compiler has to emit generic code which is then harder to flow through constraints and emit the same final assembly since it's less similar to the "canonical" version of the code that wouldn't use a magic `==` (in this case) or std::vector methods or something else like that.

[0] https://godbolt.org/z/vso7xbh61

[1] https://godbolt.org/z/MjcEKd9Tr

btdmaster··on Linear Address Spaces: Unsafe at any speed (2022)
I think you could argue there is already some effort to do type safety at the ISA register level, with e.g. shadow stack or control flow integrity. Isn't that very similar to this, except targeting program state rather than external memory?
btdmaster··on Unix v4 (1973) – Live Terminal
Everything really is a file: if you do `cat /` you'll get back the internal representation of the directory entries in / (analogous to ls)

And they still had coredumps at the time if you press ctrl-\

btdmaster··on Assorted less(1) tips
You can also press `s` to save data from a pipe to a file rather than manually copy pasting.
btdmaster··on Loss32: Let's Build a Win32/Linux
Ah you can use https://github.com/NixOS/patchelf/pull/564

So you can do e.g. `patchelf --remove-needed-version libm.so.6 GLIBC_2.29 ./mybinary` instead of replacing glibc wholesale (step 2 and 3) and assuming all of used glibc by the executable is ABI compatible this will just work (it's worked for a small binary for me, YMMV).

btdmaster··on Loss32: Let's Build a Win32/Linux
Yes you can do this, thanks for mentioning I was interested and checked how you would go about it.

1. Delete the shared symbol versioning as per https://stackoverflow.com/a/73388939 (patchelf --clear-symbol-version exp mybinary)

2. Replace libc.so with a fake library that has the right version symbol with a version script e.g. version.map GLIBC_2.29 { global: *; };

With an empty fake_libc.c `gcc -shared -fPIC -Wl,--version-script=version.map,-soname,libc.so.6 -o libc.so.6 fake_libc.c`

3. Hope that you can still point the symbols back to the real libc (either by writing a giant pile of dlsym C code, or some other way, I'm unclear on this part)

Ideally glibc would stop checking the version if it's not actually marked as needed by any symbol, not sure why it doesn't (technically it's the same thing normally, so performance?).

btdmaster··on Valve reveals it’s the architect behind a push to bring Windows games to Arm
> When you get into lower power, anything lower than Steam Deck, I think you’ll find that there’s an Arm chip that maybe is competitive with x86 offerings in that segment.

At which point does this pay off the emulation overhead? Fex has a lot of work to do to bridge two ISAs while going through the black box of compiler output of assembly, right?

btdmaster··on Abuse of the nullish coalescing operator in JS/TS
See also "Parse, don't validate (2019)" [0]

[0] https://news.ycombinator.com/item?id=41031585

btdmaster··on Speech Enhancement Mamba
SEMamba is a speech enhancement model to denoise speech.

Demo: https://roychao19477.github.io/speech-enhancement-demo-2024/

Try it: https://huggingface.co/spaces/rc19477/Speech_Enhancement_Mam...

btdmaster··on UK government states that 'safety' act is about influence over public discourse
The Times is more or less lying here.

https://www.judiciary.uk/wp-content/uploads/2025/08/Wikimedi...

> On 18 March 2024, the Secretary of State was provided with a Submission which made it clear that Category 1 duties were not primarily aimed at pornographic content or the protection of children (which were dealt with by other parts of the Act).

Notice this is under Sunak, not Starmer. The Times chooses when to support and opposite the Online Safety Act based on which party is in government, and provides evidence for its view by lying through omission.

The Online Safety Act is undeniably terrible legislation, but you won't find good-faith criticism of it from the Times.

btdmaster··on Fingerjigger
To anyone who does keyboard handling, please don't use KeyboardEvent.code like this site does unless you have a reason to ignore all users that use a different keyboard layout: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEve...

> Warning: This ignores the user's keyboard layout

btdmaster··on OpenSSH Post-Quantum Cryptography
This is true, but there is a subtle point that key K1 used for the classical algorithm must be statistically independent of key K2.

If they're not, you could end up where second algorithm is correlated with the first in some way and they cancel each other out. (Toy example: suppose K1 == K2 and the algorithms are OneTimePad and InvOneTimePad, they'd just cancel out to give the null encryption algorithm. More realistically, if I cryptographically break K2 from the outer encryption and K1 came from the same seed it might be easier to find.)

btdmaster··on GPT-5 System Prompt?
I might be wrong, but can't you checkpoint the post-system prompt model and restore from there, trading memory for compute? Or is that too much extra state?
btdmaster··on Logical implication is a comparison operator
Great catch, thanks!
btdmaster··on AI agent benchmarks are broken
There is a cool solution for this: https://huggingface.co/spaces/Jellyfish042/UncheatableEval

This doesn't work for instruction-tuned models, but it's an interesting alternative approach that doesn't need a complicated (and thus gameable) evaluation function or human interaction. Instead, predict the next word with data newer than the training set.

btdmaster··on Matrix v1.15
Thanks again for taking the time running me through these things.

> we are very mindful of the risk of not sharing existing history to the wrong users (or devices), which is one of the reasons it's taken so long to land.

It's great to hear these things are kept in mind going forward, should hopefully mean it's less hard to make protocol changes when they are needed.

btdmaster··on Matrix v1.15
Thanks a lot for chiming in! That's nice to hear it's better and improving.

View from 1000 feet: maybe a way to lock a room's users would be interesting? So that new users in, say, a DM room do not get decryption keys for messages from the client. Something like a weaker form of "only send messages to verified users", where you could have a DM room with (at most) 2 people.

Or, instead, maybe an option to disable forwarding session keys older than the user's room join event, to keep forward secrecy so that a new user does not get to read old messages (or does this already happen every 100 messages?).

btdmaster··on Matrix v1.15
Does anyone know if homeservers still control room membership + user key lists or if it's somehow properly signed now?

I couldn't find anything on https://matrix.org/blog/2022/09/28/upgrade-now-to-address-en...

btdmaster··on Ask HN: SQL ORM with nested atomic updates?
Yup, but when I've tried gorm this is not generic enough to let me do this nested generically (with relations).

In gorm you can't do Car.update({'soundsystem': [{id: 'bluetoothProtocolId'}]}), you can only do something like Car.Association('soundsystem').update([{id:'bluetoothProtocolId'}]), fundamental difference being that the latter is dealing with Car internals and is not generic.

btdmaster··on Ask HN: SQL ORM with nested atomic updates?
I found https://github.com/sqlalchemy/sqlalchemy/discussions/7336#di..., then I added list support by checking the type of kw[key].
btdmaster··on Ask HN: SQL ORM with nested atomic updates?
I see, that's very cool! It was more about getting it to do the nested update bit though, as in being able to do session.update on the Car with semantics that it will update the Driver connected to the Car, rather than point to a new driver.

It seems though this needs to be done by fiddling through ORM internals though, as I could not find any that would implement this kind of PATCH semantics.

btdmaster··on Landrun: Sandbox any Linux process using Landlock, no root or containers
Very cool project! I was curious if this was possible with util-linux (provider of the unshare command that provides namespace management, the underlying feature behind containers), and it is indeed possible:

setpriv --landlock-access 'fs:remove-file,remove-dir,write-file,make-reg' touch /tmp/foo # Permission denied

setpriv --landlock-access 'fs:remove-file,remove-dir,write-file,make-reg' --landlock-rule "path-beneath:make-reg:/tmp" touch /tmp/foo # Allowed

Very verbose unlike unshare and really deals with internal details, so I'd find it hard to use setpriv in practice.

btdmaster··on The features of Python's help() function
An interesting side effect is that it runs the code inside the module you import, so that code can act based on whether it gets imported by help or not:

https://tio.run/##VY6/DoIwEMb3PsUXl6ODLK7ETVcfwBhylBqIpW1KB3...

btdmaster··on Cracking a 512-bit DKIM key for less than $8 in the cloud
That's not correct. Consider, for example, a processor that can handle 2^31 computations per second. 2^32 operations can be computed in 2 time units, whereas 2^64 operations will take 2^33 time units.

search_space(n: number_of_bits) = 2^n * k

so search_space(1024)/search_space(512)=2^512, not 2^2.

Asymptotics in GNFS are better[0], but only on the order of e^(cbrt(512 * 64/9)) times more work, not 2^2.

This would give an approximation of math.exp(math.cbrt(512 * 64/9))*$8 = $40 million for 1024 bits.

[0] https://en.wikipedia.org/wiki/General_number_field_sieve

Page 1 of 12Next →