HN user

dav

193 karma

[ my public key: https://keybase.io/dav; my proof: https://keybase.io/dav/sigs/dcGV_GXYCDyTdo9Ox2qRdYGG-ZW0L5GePd_z0z9O0Cw ]

Verifying my Blockstack ID is secured with the address 19HZAtt3k2ydZVtqXjn5uGvXQZUYDjjwu6 https://explorer.blockstack.org/address/19HZAtt3k2ydZVtqXjn5uGvXQZUYDjjwu6

Posts2
Comments64
View on HN

iOS Data Protection — The Four Classes

Data Protection is implemented by constructing and managing a hierarchy of keys, building on the hardware encryption technologies built into Apple devices. It's controlled on a per-file basis by assigning each file to a class; accessibility is determined by whether the class keys have been unlocked.

The four protection classes, from strongest to weakest:

NSFileProtectionComplete — Files are only accessible when the device is unlocked.

NSFileProtectionCompleteUnlessOpen — A file can only be opened when the device is unlocked, but is not closed when the device is locked — it's encrypted when the last open handle is closed. Suitable for data being uploaded in the background.

NSFileProtectionCompleteUntilFirstUserAuthentication — The resource cannot be accessed until after the device has booted. After the user unlocks the device for the first time, the app can access the resource and continue to do so even if the user subsequently locks the device. Fortify This is commonly called AFU (After First Unlock). This is the default class for all third-party app data not otherwise assigned to a Data Protection class.

NSFileProtectionNone — The resource has no special protections. It can be read or written at any time. The encryption only uses a key derived from the device's UID.

The BFU/AFU Distinction — The Heart of the Signal Issue

Apple's iOS devices operate in two key security states that directly impact data accessibility: Before First Unlock (BFU) and After First Unlock (AFU).

When an iPhone is in the BFU state, it has been powered on or rebooted but not yet unlocked with a passcode. In this state, the Secure Enclave does not release the decryption keys needed to access most user data.

Once you've unlocked once (AFU), files protected with NSFileProtectionCompleteUntilFirstUserAuthentication become accessible, the Keychain is available, and background processes and apps can access encrypted content as needed.

The Signal notification content issue connects here because notification data (including previews) stored in the default CompleteUntilFirstUserAuthentication class remains decryptable by any process — including OS-level forensic tools — as long as the phone has been unlocked at least once since the last reboot.

I spent a little time ~2012 trying to think how to create a system like this that would work with iPhones at burning man. Never really got anywhere with the idea, but I’m excited to try this!

I have three maxims that basically power all my decisions as an engineer:

1. The three C’s: Clarity always, Consistency with determination, Concision when prudent. 2. Keep the pain in the right place. 3. Fight entropy!

So in the context of the main example in this article, I would say you can try to improve clarity by e.g. wrapping the existing auth code in something that looks nicer in the context of your new endpoint but try very hard to stay consistent for all the great reasons the article gives.

Wow. Great idea and overall goal, but I’m disappointed in some of the placement choices.

Tests very much in particular deserve more weight. Being DRY is nowhere on the same level as bike shedding code style.

Commenter actually read the article before commenting, like a n00b. It brings up social media and income:

"Various studies around the world have proposed different explanations, such as economic status. Lower income is associated with greater declines. One study looked at use of computer games among young people [as a possible explanation]. Some folks have tracked declines in alcohol use, and we know that [alcohol use] can be associated with disinhibition. We have seen, somewhat, [an] increase in sex toy use—from what we looked at, not a massive increase. If there is a change, it’s probably just going to contribute to one of the blips. I don’t expect it to be the explanation."

I was working with a personal trainer on handstands for a couple of years. It’s hard! The training exercises in this article are very close to the program I did with him. Of course it’s more helpful to have 1:1 coaching but, the progression outlined here looks correct to me. Don’t forget the warm up!

Another thought, having an in-app calculator (so one could free calculate factors of an arbitrary number) might generate interesting data to see the approaches your users take? I could see how that might be interesting data for cognitive mathematics research.

I'm pretty sure it was _why who set up the first darknet I was ever on. You had to set up your /etc/hosts and do some other tricks, to browse to hidden pages. Unless I'm confusing with another similar thing around the same time, there was some JS involved and you could find hidden features layered on regular websites.

Have not. Never heard of the Vala programming language before either. It does not seem to be a particularly popular application so definitely the kind where I would read the source first. Luckily it does seem pretty readable, so I will check it out, thanks!

I had not, just installed it though and it looks fantastic, thanks! The best I'd found previously was a no-annotation script that failed most of the time with a vague "something went wrong" error.

The main thing I miss from OS X is Droplr (pain free sharing of annotated screenshots) and Jumpcut (pastebuffer history tool). Can't find anything on Linux for either of those that works nearly as well. I can still go to an old Mac for occasional needs like Final Cut Pro but those are tools I used several/dozen of times every day before.

I'm on PopOS.

From what I understood when I worked at LiveNation, every time you buy a ticket from Ticketmaster the transaction flows through some ancient spaghetti COBOL, probably running in Phoenix.