Live data from Hacker News

Calling NSA to find your encryption key after a few bits were flipped (2010)

astroengineer.wordpress.com

41–50 of 125 posts

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#41
post #20

Earlier quoted context omitted.

Can you explain what you mean by that?

Filesystems keep checksums of every block of data. If single bits are flipped then they can be corrected. If you encrypt at a lower level than the filesystem then you're at the mercy of that lower level's error correction, but in practice it is rare to encrypt at a lower level. Typically it's done at the filesystem level or higher, including when using self-encrypting drives.

Block-level encryption in SAN is pretty common.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#42
post #12

Bit flips are scary even on Earth. At a previous job, we had a customer who suddenly couldn’t send us email anymore. When their IT sent us the server logs to “prove” it’s our fault, we saw that the one letter in the cached MX record was wrong. This was puzzling, until I looked at the ASCII table to verify that the difference was exactly one bit. We never found out where in the name resolution process the bit got flip…

Bit flips are quite useful for sorting huge arrays of data: https://news.ycombinator.com/item?id=28766154

That code has a race condition :^)

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#43
post #6

Besides hardware mitigations (radiation hardening, ECC memory) what would be software mitigation techniques for this?

To protect against bit flips in car fly-by-wire systems, each signal is sent three times with the 2/3 majority making the decision. This happened after the runaway Prius fiasco that may have been caused by a gamma ray. Prior to that incident the fly-by-wire system only sent one signal.

This is really inefficient, two bitflips in the same location will result in a bitflip. For 3x the space surely there's a more resilient scheme that can handle more.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#44
post #12

Bit flips are scary even on Earth. At a previous job, we had a customer who suddenly couldn’t send us email anymore. When their IT sent us the server logs to “prove” it’s our fault, we saw that the one letter in the cached MX record was wrong. This was puzzling, until I looked at the ASCII table to verify that the difference was exactly one bit. We never found out where in the name resolution process the bit got flip…

Bit flips are quite useful for sorting huge arrays of data: https://news.ycombinator.com/item?id=28766154

That's not a proper sort. A sort is not just a function that takes in a list and returns a list that is sorted. The result must also include all of the elements that you had when starting. That property isn't checked by the code you linked.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#45
post #6

Besides hardware mitigations (radiation hardening, ECC memory) what would be software mitigation techniques for this?

To protect against bit flips in car fly-by-wire systems, each signal is sent three times with the 2/3 majority making the decision. This happened after the runaway Prius fiasco that may have been caused by a gamma ray. Prior to that incident the fly-by-wire system only sent one signal.

They do this in planes, but with different coders for the three inputs in case of human coding error as well.

Unfortunately, humans tend to make similar errors at similar areas of code when given the same specs.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#46

Earlier quoted context omitted.

Filesystems keep checksums of every block of data. If single bits are flipped then they can be corrected. If you encrypt at a lower level than the filesystem then you're at the mercy of that lower level's error correction, but in practice it is rare to encrypt at a lower level. Typically it's done at the filesystem level or higher, including when using self-encrypting drives.

Which filesystems support this degree of integrity checking? Presumably ZFS, but what about EXT4/3, ReiserFS, BTRFS, ZFS, NTFS, and FAT32? It would be wonderful if they all have the feature, but I thought only ZFS was really that paranoid.

ZFS and BTRFS have nice online scrubbing features, but nearly every filesystem these days is journaling, including NTFS and XFS (and its contemporaries). Journaling means every block has a checksum. Sure, FAT32 doesn't have that, but no one should ever have the expectation of data integrity on FAT32. You can run checkdisk on journaling filesystems to scrub for errors.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#47
post #35

Earlier quoted context omitted.

I have super bivalent opinions about Intel. This is the opposite of ambivalent, it means heavily charged in both directions, but cancellation is not allowed. So that's why they should have let all their chips do ECC instead of making it a premium feature, it would have been better for their brand as "Chipzilla" and had no real cost. And it's dangerous! In fact a soft-error at sea level killed an operating system upda…

It's your error, having a system with important data no actual/realtime backup no second system and no plan to recover from a failed update and no ecc is YOUR error alone. However, intel should have made ecc the standard and not just for 1000$+ Xeons.

>However, intel should have made ecc the standard and not just for 1000$+ Xeons.

Agree 100%. IMHO, the choice between "domestic" and "industrial-strength" should not mean choosing between different degrees of risks of failure.

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#48
What happens if a bit is flipped in a private key embedded in a HSM? For example the root CA private key or the root cold wallet key for a cryptocurrency exchange? In this case you are not able to alter the public key to correct for the bit flip (like they did with Voyager). I guess if that happens you are toast?

Re: Calling NSA to find your encryption key after a few bits were flipped (2010)

#50

What happens if a bit is flipped in a private key embedded in a HSM? For example the root CA private key or the root cold wallet key for a cryptocurrency exchange? In this case you are not able to alter the public key to correct for the bit flip (like they did with Voyager). I guess if that happens you are toast?

Yeah same happens if someone tries to open it and the HSM deletes the content, or someone physically burns it, etc.

Generally that's why you ideally don't just have one key, but multiple. Ideally with voting, but even if you just replicate the key into a second HSM at a different physical location, it's going to improve your situation a lot.

Post reply on HN