Live data from Hacker News

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

astroengineer.wordpress.com

101–110 of 125 posts

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

#102
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.

> Filesystems keep checksums of every block of data.

False. A limited number of filesystems keep checksums of data - most notably ZFS and btrfs. Some like ext4 and APFS will do it for metadata only. One of the most commonly used filesystems, NTFS, does not for either data or metadata.

> Typically it's done at the filesystem level or higher, including when using self-encrypting drives.

I don’t know where you got this idea from, but it’s basically the opposite of true.

> If single bits are flipped then they can be corrected.

Also false. Most checksums are used for error detection, not correction. CRCs as are typically used for filesystems are not particularly well suited for error correction.

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

#103

Earlier quoted context omitted.

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.

Journaling means that there is a two phase commit to the metadata of the file system. This helps avoid file system corruption on unclean shutdown and speed up recovery after an unclean shutdown. But it has nothing to do with data checksums. You can’t perform any scrub like behavior to validate your on, e.g., ext4 just because it has a journal.

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

#104

Earlier quoted context omitted.

You're unlikely to notice a single bit flip in a picture you take.

I just tested this on a JPEG. Flipping any bit in the first few bytes of a JPEG renders it unopenable on my Fedora system. I get that it's just a header and could probably be fixed, but there are consequences for bitflips, even on images.

For compressed images (such as JPEG), if you flip a bit in the image section that breaks the compressed data, and the decompression algorithm won't make sense. However it could also be that there's a checksum on most of the file data. That would explain why you can't open the image at all.

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

#105
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…

That is why I migrated from Raid 1 to ZFS on my home server and do weekly scrubs. Not sure if this would have prevented your case though.

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

#106
post #88
post #65

Earlier quoted context omitted.

Did you mean ray's condition?

Oddly apropos anecdote to your pun: About 15 years ago, while working on Windows at Microsoft, a test machine sitting at my desk hit a kernel panic (BSOD). As was standard working on the test team, the machine was already setup for kernel debugging, and so I set out to debug it a bit in order to file a decent bug report. Hours later, I couldn't make sense of it (I wasn't super experienced at this point). A few of the…

Ray complained in 2005 that Microsoft sees lots of weirdo crash reports from computers with overclocked CPUs https://devblogs.microsoft.com/oldnewthing/20050412-47/?p=35...

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

#107
post #35

Earlier quoted context omitted.

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.

"It's your error, having a system with important data no actual/realtime backup" Have you ever taken picture of anything important with your phone, like a crime, or a car accident? Have you ever called 911 or sent money? How dare you use an unreliabke system without ECC, what if a random bitflip would cause it to send 10x more money or data woupd be lost without realtime backup! This disrespect to users and wanky att…

I dunno, I think both points of view are valid, and it's important to be pragmatic. Stuff fails all the time and it's usually not a big deal. Every holiday season, all the cash registers at Cost Plus stop working, and I stand in line for an hour to buy stocking stuffers. All three AV nerves on my heart failed and I had to get a pacemaker. The first night it skipped 5 beats and the doctors scratched their heads for a while. Turns out it was a loose ring terminal! I have no idea if it has ECC memory, but probably not, because it's a pain to replace the battery...

The probably of most things randomly failing at any particular instant is approximately zero. The probability goes up as you increase the size of the time window, or push things to their limits. You can trust your phone to store an important photo for a few days, as long as you don't run it through a washing machine or something. A few years? You're taking a risk. Many people take that risk, and it works out fine for them. I've had phones fail, hard drives fail, heart nerves fail. I take reasonable precautions to back up stuff I care about. I also have plenty of data that I would be bummed to lose that I haven't backed up yet. I'll get to it one day, or maybe it will get corrupted and I'll be bummed.

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

#108
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…

It's scary to think an election can be flipped due to cosmic rays https://en.wikipedia.org/wiki/Electronic_voting_in_Belgium

Can't wait for the History Channel documentary on this... "Aliens"

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

#110
post #39

Earlier quoted context omitted.

Article says "which was only a handful of bits away from the original". As non-native speaker i don't know the exact nuance of handful when considering bits, but it seems a lot

No a handful in this abstract context (strengthened by the word “only”) means not so many (which given even the power of the computers at the disposal of the NSA at the time was enough to ruin your 2 weeks).

And our love/hate relationship with the English language continues :)

My latest annoyance: https://www.usingenglish.com/forum/threads/three-times-as-mu...

At least we don have such problems in programming langu... Actually, never mind.

Post reply on HN